TL;DR
If it leads to new situations or fresh characters, GREAT!
If it's at the very end of the story and it's just there to pull the rug out, BAD!
Playing against types
A stereotype inversion is still only 2-dimensional. Chances are it doesn't really alter the plot much. It's probably better than the usual, but not by much, since it's still based on stereotypes and tropes.
Take for instance the trope subversion that Luke and Han are heroes who rescue Leia, a damsel in distress. The trope would be that the men go in, guns blazing with confidence, and the grateful Princess Toadstool gives them a reward from her father's treasury. But in Star Wars all the storybeats are subverted so the guys are bungling amateurs who get themselves trapped in the prison block, and she's actually some sort of ball-busting toughguy who has to rescue them.
The plot doesn't really change though. They still "rescue a princess from a tower" and escape by the seat of their pants. By the end they are regular heroes and she is a princess handing out rewards. The story is filled with moment-to-moment subversions – it's a fun ride, but the overall plot and especially the ending are 100% expected.
The unexpected ending
In contrast, every few weeks we see some variation on a question about "Can my villain win?" and the answer is always "Of course, but why, what does it add to the story and say about your world?"
In 99% of stories where the reader is expecting a Big Battle™ at the climax, the protagonist will be an underdog and the villain will be overpowered. It doesn't actually subvert anything by letting the overpowered villain win – the typical storybook ending is the subversion. The opposite of the storybook trope is "reality". It's not actually a trope subversion – it's nothing. It's normal.
It was a 2-dimensional trope before, but when the "bad guy wins" it's 1-dimensional. But the real issue is this "subversion" doesn't lead to anything. Maybe it works, but it's the ending so it can't be explored or developed. At best it's a quick gotcha, at worst it's a shaggy dog story.
Subvert All Tropes
IMO, the reason we've been hearing non-stop about "trope subversions" is they are a reaction against formulaic movie writing like the 3-Act screenplay and "Save the Cat" tells that leaves the average media-saturated human aware of what is coming. It's now an edgy trend to break the rules just to break the rules, (as opposed to 1977 when an avalanche of inverted tropes in Star Wars felt fresh and fun).
If you only look at trendy media produced by HBO and Netflix, you'd think there are no more stories, just a continuum of "story rules" that exist to be broken so the audience can experience temporary confusion, anger, and scream WTF, then go and complain about it on social media to drive show curiosity and cultural cachet. It's an Emperor's New Clothes effect where the subversion feels radical. This is a commercial decision, not a storytelling decision.
Most creative artists recommend to not chase a trend. By the time you get your trendy work published the market will be saturated with copycats, as well as the grandfathers that re-emerge from back catalogs. Publishers and readers alike will be hunting for the next new trend, which might even be a reaction against the trend you've been chasing.
It can backfire too of course. The same fanboys who worshipped Star Wars (ironically choosing to focus on it's jejune "hero's journey" aspect while ignoring the many trope inversions that make it entertaining, had a cosmic melt down over The Last Jedi's trope subversions. Now, according to Youtube analysts, audience expectations must be subverted in a specific way or you're "breaking the rules" wrongly.
The irony of that statement suggests we are already at peak trope subversions. Trope subversions are becoming a trope.
in conclusion
- Character trope switcharoos can lead to a fresh take on old plots
("Cinderfella"), but protagonists still need arcs and narratives
still need satisfying conclusions that feel like an ending.
- If you're going to subvert the plot, do it early so an interesting narrative can come out of it. Gotcha endings are only appropriate in genres that are
intended to be unsettling. They will signal that they exist in a
gotcha universe – thriller, horror, weird, crime, psychological, etc.
- Avoid (as opposed to subvert/invert) character clichés as much as
possible by writing deeper, more realistic characters. A rich
character with complicated motives and realistic consequences doesn't
need to be subverted.
I think character is far more important to
holding reader interest than subverting tropes and trying to surprise
readers with the unexpected ending.