Actually, there are 2 things you leave out.
1.) The majority of firepower the Russian have is down south, Kherson front have not been moved since maybe day 10 (after they captured Kherson) the force there is putting into defensive position, suggested that they had hollow out everyone toward the Mariupol front. If I am Ukrainian, I will try to counter attack Kherson, that may relief some pressure off Mariupol.
2.) It would also depends on how much Ukrainian can grind down the Russian force. It's one thing if Russian were able to capture the city (which as I mentioned couple of time, never any doubt) but another thing is to look at what kind of force that was left after they have captured the city, if they loses too many troop trying to capture the city, They can't push, because they would have to leave behind a garrison and depending on the actaul casualty number, there may not be enough well stocked troop to move up especially when it was heavily contested during the last 20 days.
That would affect the defensive posture the Ukrainian is going to take. Because if the Russian cannot effectively encircle the Donbas defender (The OG since 2014) then the Ukrainian could technically afford to put the flank up by refusing it and basically fighting a 2 sided defence. On the other hand, if Russia have enough troop to encircle the Donbas defender, then it will force the Ukrainian to either push to a secondary defend line thru Dnipro to Kharkiv, or even all the way along Dnieper River.