Can anyone show me a situation where a sci-fi/fantasy book has the hero as a raging lefty commie, and the villain as a libertarian?
Full on Leftist/Commie heros? Doubtful.
Although I would say there's lots of nominally Leftist Sci-Fi that's out there.
Most of Isaac Asimov's work was somewhat Leftist in tone. Although one might argue it was also borne of his agoraphobia, living most of his life in New York City, and his disdain for travel. Where such urban settings are normally somewhat more collectivist in function. Such as the Domed mega-city of New York of his Robot novels with it's agoraphobic residents, who were anti-robot labor for fear of being unemployed, while the wealthy and widely distributed "Spacers" lived on sparsely settled colony worlds with armies of robots... And then his future fascination with the world-City of Trantor in his Empire-era novels.
Some feel Ian Banks' "Culture" is Leftist, although in it's post-scarcity society, it's unclear to me if such distinctions are meaningful, and if it really just hasn't gone full-circle to Libertarianism.
Ursula K. LeGuin's "The Dispossessed" is very Leftist, although it's pretty even handed with criticisms of both planets collectivist and capitalist societies.
Most of the stuff in sci-fi that's billed as "Leftist" is often just dystopian futures that both the Left and the Right would find abhorrent.
For instance, "1984" is often listed in compendiums of both Leftist and Right-wing Sci-Fi, on the Right, it's understandable, because it's obviously an indictment of Communism, with "The Party" etc. However, the Left often gravitates to the book, perhaps seeing the government instead as Fascist, and also falling back on Orwell's well known support for Socialism, or perhaps as a warning of "good" Leftist ideology being perverted when it's taken too far.