Ukraine should give up Donbass at this point, and give up NATO membership as well, in exchange for continued sovereignty. If Russia pushes further, surrender without fighting.
An analogy is this: when being robbed, you give up exactly what the robber asks for. Your possessions aren’t worth your life. Similarily, Ukraine’s sovereignty is not worth having hundreds of thousands of people die.
Worth noting they did this in 2014- didn’t fight over Crimea.
There’s a risk that no matter what they agree Putin will still come back.