This is why I don't see this ending.
If Russian past track record is and indicator, they are ready to bury enemies their own bodies if needed.
I remember reading about Russian WW2 book. In Chechnya, they took grievous casualties, almost collapsed, but in the end won. Attrition warfare in its finest.
Putins idea is that he has more soldiers than Ukrainians have bullets.
Even if they will be really beaten back to their staging grounds, they will be coming back until a complete defeat.
Ukraine has no power at the moment to really overrun Russians enough for them to consider the war to be lost.
And even if they will hit that "the war is lost moment," they will wrap up, and regroup in a few years with draft covering for all lost troops. Even without military hardware, Russia still has 140 million people, of which most are rather obedient, and well educated to man sophisticated weapons.
Unless Ukraine can really capture territory from Russia, they cannot set a long term defensible line.
In other words, Putin will keep coming back matter what, unless Moscow falls.