In almost everything McCain says and does, whether he knows it consciously or not, what he is subconsciously saying to these foreign crowds is, "I'm sorry that Trump is the President and not me. I know that you all know that I would be a much better President than Trump."
And in the Senate he is actively working to make that statement a fact by sabotaging and undermining anything/everything Trump tries to do. McCain wants revenge against Trump and against America in general for electing him. And he will do whatever it takes to get it.
After all, what does he care? A year from now he won't have a care in the world, no matter what happens.