The only way this can turn around for Ukraine is a the war expanding into a (more) direct conflict between Russia and NATO, which would create a high risk of a nuclear exchange, which is unacceptable.
Ukraine lost. The only question now is how many more of their people they’ll send to pointlessly die before they start serious negotiations (i.e., not wild demands like getting Crimea). This is the months leading up to the end of WWI.
Sometimes the law is wrong, and following it is wrong
Dying for nothing in a lost war is one of those times