There's nothing inevitable here. The Russian army is being show to be a joke right now.
Ultimately there will have to be some sort of negotiated peace (Ukraine can't fight all the way to Moscow) but the more of the Russian Army they destroy and the longer they hold them off the better the terms they will get.