How do you know that Putin would still have invaded? For this you first have to know why he invaded. The most plausible reason - at least to me - is what Putin himself said over and over again, Ukraine becoming a NATO member. There are certainly other things to be gained - Ukraine's oil and gas resources, Crimea with the strategically important naval base in Sevastopol, water supply for Crimea, easier to defend borders, protection of the Russian minority and probably more - but I don't think they carry as much weight as Putin's security concerns.
This is not too different from the Cuban Missile Crisis. How would the USA react today if Russia attempted to put missiles on Cuba, for defensive purposes of course? Or better, how would they have reacted 15 years ago so that we keep the Ukraine conflict out of this thought experiment?
In no way do I want to defend this war, I want to see Putin defeated as much as everyone else, but unfortunately this is what you get if there are incompatible interests and no one backs down or tries to reach a compromise.