I am making an assumption that there’s a process to go through, opposition to be countered and agreement to be won before changes are ratified.
If they can't sustain the war effort because their economy has collapsed, they'll have to withdraw. When that happens, Ukraine get their land back. It can then be a prerequisite for Russia to end their claim in order for sanctions to be removed, which would be a no brainer for them.
Let's not fall for Russian propaganda - 'oh, sorry, we can't legally let Ukraine have that land which is Russian' etc.