In Stephen Berkoff's The Trial, Joseph K spends the entire play trying to fight a trial he doesn't understand in a world that is set firmly against him. He collapses and dies in a cathedral in the final scene, no closer to understanding or accomplishing anything than at the beginning.
And the bad thing is, that's actually better than what winds up happening to him in Kafka's book.
Does the protagonist of Elmer Rice's play The Adding Machine avoid being executed for murdering his boss? No. Does he have a chance of doing better in his next life? No, each time he is reincarnated, he gets worse. Does he at least get the companion promised to him, a nice-looking woman called Hope? No. That's the situation when the final curtain falls.
In Urinetown, Protagonist Bobby Strong inspires the poor to lead a revolution against the evil Caldwell B. Cladwell, who has gotten private toilets outlawed, charges exorbitant fees for the use of his public toilets, and has his corrupt police force take anyone who subverts his goals to the titular Urinetown (which is in fact simply being thrown from the tallest rooftop in town). In the end, Bobby himself is taken to Urinetown before he can see the revolution through to fruition, and once the poor win out, and everyone can pee for free, the town's water supply quickly dries up and everyone dies horribly while the inspiring victory music of the finale continues to play.
The plot of the musical "Chess" revolves around the romance between the Russian chess champion Anatoly and the American second, Florence. The London and Broadway versions differ in the details, but the ending remains roughly the same in both. Anatoly defects to the United States. In an effort to get him back into the fold, the Russian powers that be offer to release Florence's father, a Hungarian revolutionary who vanished during the 1956 Budapest uprising, if he loses the match and comes back to Russia. In the end Anatoly decides that he cannot hurt Florence by keeping her from her father, so he defects back to Russia. It doesn't matter anyway, since the man the Russians release is actually a captured American spy, as part of a deal with the CIA. Florence's father is probably dead. Anatoly has given up Florence and the match for nothing much at all.
As well as the example in the Literature section, the song "Turning" in Les MisÚrables is one long Lampshade Hanging of this trope, although the first line is somewhat stupid when you consider that most of the dead students had participated in the 'successful' July Revolution 2 years before.
They were schoolboys, never held a gun Fighting for a new world that would rise up like the sun Where's that new world, now the fighting's done? Nothing changes, nothing ever will Every year, another brat; another mouth to fill Same old story, what's the use of tears? What's the use of praying when there's nobody who hears?
At the end of The Lieutenant of Inishmore, Nearly everyone is dead, and Mairead is likely to kill her brother and Padraic's father shortly because of their role in the death of her cat. And then it turns out that the INLA people had only killed a random stray by mistake; Wee Thomas is still alive and well.
While most of Shakespeare's tragedies end with some kind of order being restored and a sense that the hero's death accomplished something... Titus Andronicus, not so much. Titus gets his revenge on people who are only slightly worse than him. This revenge costs him his life. In the final scene, we see that his one remaining son has learned nothing from his father's example and is ready to start another blood feud. Alone of the tragedies, Titus is not supposed to be in any way uplifting or cathartic, but to be disturbing and shocking.