I could unfortunately see a scenario where Putin could retreat and still survive, I've lost all confidence that anyone will ever stand up to Putin, I don't know what happened to Russia but it seems like every single person is afraid of him. There is hardly any criticism directed towards him, it is carefully and specifically always directed towards Shoigu or Gerasimov, aside from Girkin who nobody takes seriously, I don't see anyone criticising Putin.
Russians seem contempt with being sent to their deaths with awful equipment and treated like shit with next to zero protests and the ones that do happen are ridiculously small for the population, the FSB will always have Putin's back and Prigozhin I don't see as a threat to Putin as the Russian MoD hates him, I see him as the most likely to meet a window by the end of this and someone else thrown under the bus to take the blame.
The Oligarchs are useless as well.
I'd say that the major thing in the near future which Ukraine has to watch out for is the US elections, if a twat like Trump or DeSantis wins then that will hurt Ukraine's support significantly. So ideally, Ukraine needs to make some major gains before then but I do have confidence that Biden will win another term.
I have had a hard time imagining any realistic scenario where Putin will have to take responsibility. The way this whole conflict has played out, the solution to it in the best case scenario amounts to Russia being beaten on the battlefield, fully pushed out of Ukraine, Ukraine being embraced as a NATO member in quick fashion, all Russians within the borders of Russia going free of any international punishment aside from (mostly) toothless sanctions against them. And this has to be good enough.
People need to remember that the vast majority of crimes of Nazi Germany went unpunished too. Only a few people were prosecuted in the aftermaths while almost everyone else was allowed to carry on with their lives. This isn't proper justice, but real politics and ideals are two very different things, that's just how it is.
So yeah, what the war is about is bringing freedom and safety back to Ukraine while the other side of the equation - the situation in Russia - can be barely influenced nor touched.