Washington revolted against Britain, while Mazepa joined a foreign army. That's like if Washington had joined the French during the contemporary colonial wars.
Mazepa sided with the Swedes to advance Ukraine's national interests, just like the Founders sided with the French to advance America's interests. The father of the Constitution himself, James Madison declared war on Britain in 1812 during the Napoleonic wars, siding with France again.
As long as you look on Ukraine as an enslaved Russian vassal, then you will always see them as traitors whenever they act in their own national interests, instead of acting in Moscow's interests at their own expense, as you expect your "little brothers" to do.