Probably the closest thing I can think of to that is one of the endings to Deus Ex: Invisible War (aka the Kingdom of the Crystal Skull of the DE series) where (it's an old game, but a spoilers a spoiler anyway):Evolutionary High said:Not a twist per se,
but a game where you fight the final boss, you lose, but instead of a game over ending, you get an actual ending of you losing and seeing what actually happens.
In one ending, if you wipe out all the factions that are vying for control of the world, everything goes badly wrong an the ensuing conflict turns the entire planet into a barren wasteland and the only people fit to survive such an environment are the Omar, a group of humans that have taken human augmentation to a pretty extreme level. Humaity as we know it is completely wiped out, so I suppose you could call that "losing".
That ending gave me a chill when I first saw it, and it still does.