That said - Ukranians have not (yet) lost all the ground. Russian forces in a large country are quite vulnerable to attack from all sides if it can be sustained and coordinated.
The Eastern 1/2 of Ukraine is largely still open even as the W. is partly contended - this gives a lot of space for Ukraine to manoeuvre and regroup - and most notably - to be reinforced from Poland.
Currently, the Russians are paying a heavy, daily price that is completely unsustainable to them.
The question becomes - can they get into a 'grinding' position in which they are wearing down the Ukranians, while at the same time minimising their costs and loses? It's hard to say.
West is also taking note and the frankly heroic and effective acts of Ukranians is encouraging giving them more gear. The Javelins etc. are being used very effectively, I mean, the US can do serious damage to the Russians just by handing off Javelins and not even putting their own soldiers at risk? That's the 'deal of the century'.
As the war prolongs, then more complicated equipment that requires even a bit of training can be deployed to similar effect.
Specifically, artillery is vulnerable to radar and rapid counter attack, so long as the equipment is there. If the Ukranians have access to this kind of tech (there is some talk of it), they can use it to disable or at least degrade any kind of 'siege artillery'. Russians have a limited supply of rockets, and they can't use their close air support (Stingers), and even fast air is a bit risky.
Ukraine is also a big country. Chechnya is 1.5M people and that was a painful mess. Ukraine is 45M people with support from the West, that's a different range of calculation.