My response is in the context of "Frozen Stalemate/Conflict" that could stretch for years.What makes you think Putin is doing all of this for his legacy?
So indeed, if this war stretches for years as a "Frozen Stalemate", AND if Russia already controlled all of DNR/LNR AND already obliterated Ukraine's elite forces/Azov in Donbass, then I can see Putin Unilaterally declare victory because his "Demilitarize/Denazify" objectives are achieved, regardless of his inability to take Odessa, Dnipro, Kharkiv, because without full-scale war mobilization, those extra territories will take too long to conquer. At almost 70 years old, he not have unlimited time for a "Frozen Stalemate" to get extra territory (Odessa, Dnipro, Kharkiv) unless he goes full-scale war mobilization, which he has aversions to so far. Plus, a "Frozen Stalemate" would tarnish his legacy, this is true. That's why it's likely he will Unilaterally declare victory rather than get into a "Frozen stalemate".
Personally, I wish Russia would go big or go home, conquer all of Ukraine or at minimum establish Novorussiya Confederation and render Ukraine a land-locked state. But in reality, it's only a 'Special Military Operation' with only 200K troops, so unless Putin goes for full-scale war mobilization, I don't think he can grab a ton of extra land in any reasonable amount of time.IMO the fractures between NATO and Russia were already unbridgable by the end of Yeltsin's second term. Putin has been waiting for a opportune moment to deliver a blow since 2014 at the latest. It's go big or go home. I recommend watching this series by Bo Zhen, a researcher for Chinese Academy of Social Sciences, on NATO expansion.