I think that was different. Both Hitler and Stalin were emotionally obsessed with the idea of controlling Stalingrad at all cost and didn’t think rationally about it.
The argument here is that Russia is in the same boat, but Ukraine is acting rational and think this is the place where they have the best odds at winning the war. The ratio of “their losses” versus “our losses” is better for them than they can get elsewhere, and at the rate of progress Russia made, they won’t run out of land soon.
Of course, whether they’re right isn’t 100% certain. From what I read, Russia is losing relatively more inexperienced soldiers than Ukraine, and those are relatively easy to replace.