Hmmmm!!! I think.... I do tend towards happy endings over tragedy, but my biggest preference is an ending I can believe in. That's not the same thing as a realistic ending -- I just have to be able to believe it in order to really find it satisfying.
I love Undertale an unreasonable amount, but I actually felt kinda mixed when I first finished the True Good Ending... because there are enough fakeouts before the real boss, where you think you've won, that when the real final ending came I couldn't quite believe in it. I found myself feeling like I preferred the bittersweet but optimistic ending I'd gotten before I found the True ending path -- just because I really believed it. I believed in the happiness and hope that your character had created in spite of the bad circumstances that hadn't quite been fixed.
Looking back on the game now that I know what's going on, I love the true ending and I get emotional about it, so I know it's not that good endings are less believable than bittersweet ones... it's that in this case, the way it was set up led me to doubt it.
Another example of what I mean is from The Dark Knight -- my memory of this movie is foggy, but the bit when Joker has the two boats rigged to explode unless one of them blows the other up stuck with me. Both boats choose not push the button ultimately, and I 100% believed and LOVED the scene on the criminal's boat, when an intimidating criminal takes the remote, saying "I'll do it, you can tell them I took it from you," and then selflessly throws it off the boat; but I couldn't believe in the other one, where the Good Upstanding Citizens take a vote, vote to blow up the other boat, can't bring themselves to do it, and then one guy says FINE I'LL DO IT, and then he can't bring himself to do it either.
So it wasn't whether the ending was good or bad -- both of them ended the same way, where they chose to spare the others. And both of them seemed to be heading towards the bad choice and suddenly veered to the good one. But in one option, it built to a powerful statement about the goodness and bravery of one unexpected person. In the other... it was chickening out from the statement it was clearly making. You can't paint a cynical picture of people willing to murder the unseen other and then at the last minute say "nahhhh, not really" without it feeling a lil unsatisfying.
But that said.... I do tend to prefer happy or hopeful endings. A lot of that is because that's honestly my worldview! It's tough for me to believe in a world that's too cynical; I find it easy and cheap to create a gross world where there is no good that can be done, and it tends not to ring true to me. Tragedy with a purpose and meaning to it is something really powerful that I have a lot of respect for, but I get frustrated reading fiction about relentless tragedy when I can see the author's hand clearly contriving this horrible world.