Putin does not want to accept defeat and throws already poorly trained soldiers into Ukraine, collects mercenaries from all over the world, but the situation is gradually turning against him anyway. It is already clear that Putin will lose this war and it will turn out to be a great disaster for this country, since it will be necessary to pay hundreds of billions of dollars to Ukraine for the damage caused to its economy and its population. It is predicted that Putin does not have long to live, and Russia itself may fall apart into separate pieces, as it previously did with the help of force with neighboring states - Georgia, Moldova, and Ukraine.
I wouldn't really assume that Ukraine is winning the war right now. I mean they are not doing bad, they are defending as well as they possibly could, but they have lost a few lands, and Russia could defend those lands easier. Mainly the two lands they wanted to take (three if you include crimea but they took that 8 years ago).
So, you are sort of right, they didn't let Russia take over the entire nation and lose, but they did not win and destroyed all of Russian army and did not allow them to get anywhere, it is a bit of a 80-20% situation where I would give success rate of %80 to Ukraine for what they have done, but not one hundred, because that would have losing no lands at all.