Looking at the possible final outcomes of the current offensive, the resistance is going to be fierce, and as more and more Ukrainians have personal friends and family members fall victim to the Russians, they are likely to go to the wire.
For reference, in Afghanistan, the Soviets between 14000 and 30000 men (depending of the source) over the course of nine years.
The Ukrainian forces are claiming over 5000 russians have been killed already. Given the sheer amount of tanks and convoys completely destroyed that are well documented, it might be high, but it's not impossible (of course, there are no official numbers yet). For the Russians, that's between 1/3 (official numbers) and 1/6th (unofficial numbers) of the Soviet-Afghan war losses in less than a week.
And when they finally take "control" of most of the country –which seems inevitable, given the Russian military sheer numbers, notwithstanding all their issues– there's definitely no way that Putin manages to place a puppet. The Ukrainians ousted the previous one for much less than what's going on now. Maintaining him in power would require large numbers of Russian troops permanently stationed all over Ukraine, which doesn't seem sustainable in the long term.
Adding to this, the Ukrainians are going to get more deadly, as they are going to get more desperate, and they now have a virtually unlimited supply of weaponry to defend themselves thanks to NATO and the EU. The EU is also going to link up our grid system to Ukraine's, to ensure power supply wherever possible, even when the Russians cut it off.
The Russians claimed air supremacy within 24 hours, and now, five days in, the Ukrainians are attacking convoys with slow, budget military drones running on 100 hp civilian aircraft engines seemingly without a bother. That would never happen if the Russians indeed had any kind of actual air control. And without air control, the Russians can only rely on bombing from a distance, which will hit and enrage the civilian population even more.
So, the final outcome becomes clear, and it begs the following question: what would happen if Putin manages* to nuke Kyiv (or any other city for that matter)?
* by manage, I mean that the command is actually carried out, as I'm sure that that order would give pause even to the most ruthless people around him.