It is likely the only way we get a result we and the locals like in Ukraine is if the Russians tire of fighting there and go home, as they did from Afghanistan. Thus we need to answer this question. What set of circumstances is most likely to cause this change of heart in Russia?
The frankly unattractive answer is a war that seems to go on forever. Russia losing is not a necessity; Russia unable to break the will to fight of Ukraine is what will eventually produce the desired result, if anything will.
David rarely beats Goliath unless the military technology available to David is much greater - not the case here. The population of Ukraine is roughly 30% of Russia’s population. It is unlikely Ukraine can in any meaningful sense “defeat” Russia. Ukraine may be able to convince Russia of the impossibility of winning, many people on both sides will die while this is happening.
Will this require regime change in Russia? That is up to the Russians collectively, and to Putin in particular. When they abandoned their occupation of Afghanistan, within two years the Soviet Union was history - a fact of which Putin is all too aware.