Above seems roughly the only type of peace deal that could stop this.
Russia has to get something out of the tremendous cost they've spent in treasure and blood, so you gotta recognize them getting Crimea and eastern Ukrainian land they've occupied. Because Ukraine realistically is never going to be able to militarily take that back.
That said, Russia is going to have to recognize the stupidity of trying to take all of Ukraine, of trying to topple the Zelensky government, where a large portion of Ukrainians in the Western part particularly hate Moscow (and the last 3 years have only made that hate worse)...so Russia trying to achieve that grand goal was always dumb both for them and for Europe who didn't want to have to deal with yet an even worse refugee crisis if that somehow happened. And why in the world would Russia want to deal with trying to manage a population that would constantly fight against them? If you break it, you own it as famously said.
Not to mention Russia really hasn't even shown the military capability to achieve that goal, if has been and would most likely simply continue to be a 'forever war' for them just gradually bleeding their population and economy.
So Russia has to give up that idea and also recognize that the Ukraine remaining is its own sovereign country that is going to have the right to defend itself, continue to maintain a healthy military that yes will probably be heavily invested into by the West, join the EU if it wants, and yes even NATO membership has to continue to be an option out there if Russia continues to act like they want to start land grabbing again.