If McCain had died in 1999 or 2000, I'd have been inclined to say that the nation lost a great statesman. But even at that time, he was one of the "Keating 5", and a guy who cheated on and abandoned his first wife (who waited over 5 years for him as a POW, and took a lot of abuse after he came home) for a wealthy younger girl that allowed him to pursue his poltical ambitions.

I've seen videos interviewing the other POW's who were with him at the Hanoi Hilton, who regard him as a traitor and a "canary" who sang for the North Vietnamese under torture, and there are televised video confessions of McCain saying every word of propaganda the North Vietnamese wanted him to say.
In fairness, I think most of us would eventually break under the torture McCain endured. But this is what the men who were imprisoned with him said, who endured the same torture.

I cringe every time I hear someone say the word "maverick" in connection with McCain's name. It's such a trite and meaningless label. And what Democrats and the liberal media love about McCain is not that he's his own man who doesn't go with the consensus, it's that McCain has been a thorn in ths side of multiple Republican presidents, where in the cases of the last 2 Republican presidents, Dems and the media can say "look, even other Republicans disagree with W. Bush".
Or Trump.

I'll concede that McCain fought against Dems and the media for the troop surge in 2008-2009 that turned the tide and won the war in Iraq (that Obama squandered and lost in Dec 2011 by prematurely withdrawing all forces, that directly caused the rise of ISIS and lost half of Iraq, and allowed ISIS to spread to 40 other nations.)

But McCain as his last vindictive act, just to spite Trump, was the single vote that obstructed the full repeal of Obamacare, just to humiliate Trump.
And actually one further last vindictive act was to say he didn't want Trump to attend his funeral. Despite that, Trump was remarkably gracious saying McCain was a great American and that his death was a loss for the country. But then the Dems and the media made a big deal about Trump not being EVEN MORE gracious and heaping on more praise (which if he did, they would just accuse him of being insincere).

Up through 2000, I'd say McCain for whatever flaws was more arguably serving the nation's best interest.
Since 2000, McCain has increasingly been a turncoat against the GOP who has served his own political self-interest, against the GOP, often siding against the GOP with the Democrats for reasons that were either confused or deliberately destructive to the nation and the GOP. He campaigned with kid gloves against Obama in 2008, and refused to expose the extreme Cultural Marxist leftism of Obama and his inner circle.
McCain similarly often sided with Kerry during the 2004 election. I increasingly saw him as a globalist/establishment Republican who was more of a foil than an actual opposition to the most radical tendencies of the Democrat/globalist Left.
David Horowitz in THE SHADOW PARTY cites ties and favors traded between George Soros and McCain.

I still give McCain credit for risking his political career for the troop surge in 2008-2009 (and likewise W. Bush, who was committed to winning in Iraq and not caving in to polls and political pressure to retreat)
But since 2000, McCain has more often been on the side of globalism and obstructing his own party than making choices that exposed corruption and served the nation's best interest. And McCain's actions actually obstructed the GOP from doing so. Unfortunately that obstruction wing in the GOP, as exemplified by Paul Ryan and Mitch McConnell, Jeff Sessions and Lindsey Graham, outlives McCain and continues to obstruct a truly reformative president, and continues to obstruct efforts of the Tea Party/"Freedom Caucus" wing, who support Trump's populist/conservative agenda.

Even in death, McCain remains a political stick with which the media bludgeons Trump. This is something McCain planned by excluding Trump from his funeral. So even in death, McCain shows what side he was truly on. In this aspect certainly, McCain's spite, not his virtue, survives and defines him.

I don't begrudge credit for the things I listed that McCain did right. But I do hold against him and expose the things he did that were either playing against his own party politically, manifesting poor judgement (in 2008 "We are all Georgians..." pushing for war to protect former-soviet Georgia in a region we have no logistical infrastructure or business, suspending his campaign in 2008 to go to Washington DC, selecting Sarah Palin over more qualified candidates, and siding against his own party in much of the Bush years, and spitefully and mindlessly siding against Trump in 2016-2018). And of McCain just acting in pure spite (as with his lone vote to obstruct repeal of Obamacare in 2017).
I also fault McCain for not resigning when he had a brain tumor, and not allowing another Republican in good health to more actively replace him. This, too, was one last malicious act to obstruct Trump and not let another Republican replace him who would more likely be a far greater legislative ally to Trump.

It annoys me, both on the more liberal networks and on Fox, how they are reluctant to say anything negative about McCain, calling him (MSNBC) "a lion of a man" and so forth. Okay, yeah, he did some good stuff. But let's also discuss that he was highly controversial, at best, at many other historical turns.

And the liberal media who call him a "lion" now, were calling him a racist in 2008, for daring to run against the Anointed One, calling him crazy from his POW experience, and a warmonger likely to start a war (by the way, Obama and Libya, anyone? Bush got Senate authorization in 2002, Obama never even asked!), and the media and Dems in 2008 labelling McCain as "just like Bush". Ironic, because except for the troop surge, McCain was largely in opposition to Bush and a thorn in Bush's side for 8 years.

So yeah, I give McCain some credit. But in full context, McCain was often an obstruction to national progress and even his an obstruction to his own party at many other turns.