They could not be removed from Afganistan either. Until they were.
Ukraine can grind up Russian conscripts and free their country inch by inch if they have to.
Meanwhile the rest of the world can help continuing to destroy the Russian economy as best as we can
The Soviets weren’t removed from Afghanistan any more than we were – they left because they lacked popular support and kept taking losses (because we were arming terrorists who would go on to do 9/11, but I’m sure that type of blowback won’t come from arming Ukranian neo-Nazis!). The parts of Ukraine Russia is occupying largely wanted to leave Ukraine before the war even started. It’s not the same scenario.
Even your best case scenario is “fight a bloody stalemate until one side runs out of troops,” which is incredibly destructive to Ukraine even if they win, and of course they won’t, because the smaller country that can’t just sit back behind extensive defenses isn’t going to win a bloody stalemate.