It depends a lot on how the villain character is portrayed and whether or not the audience is given enough content for them to not feel like the win is total BS/an absolute bad end. The closest I've seen to this is Gundam Iron-Blooded Orphans, and it still falls horribly flat because the guy who...