IF there is a stalemate on the military side that doesn‘t mean things are overall frozen.
Sanctions are a long-term problem for Russia, and Putin doesn‘t seem to be getting much younger either.
For example I can‘t imagine sanctions being lifted without the full territorial integrity of Ukraine being restored. Doesn‘t mean it happens soon - but in the long run Russia is way more fucked than Ukraine.
Lastly, not winning is already a gigantic loss for (and threat to) Putin. Anyone remember the „3 days“?
I think in the mid- to longterm it would be misguided to think that military wins are the only factor to consider. Even in the (imho unlikely) case of a stalemate not all is lost.