War is the continuation of politics by other means and Necessity is the mother of invention.
IF Russia loses on the battlefield and IF it finds it necessary to conclude a peace treaty with Ukraine, then Ukraine won't care overmuch about Russia's constitutional arrangements.
"Yes, we understand, your constitution doesn't allow for it. Never mind." makes no sense.
Whether constitutionally or informally, all nation states have an extreme aversion to loss of territory. Doesn't mean it doesn't happen, when a state loses a war.
etc...
At some point, if mobilization, nukes, or gas blackmail doesn't solve Putin's problems, Russia runs the very real risk of not having armed forces able to challenge Ukraine on Ukrainian territory. Then all the "constitutional stuff" doesn't matter all that much.
IF Ukraine is in a dominant enough position to impose terms then Russia will have no choice but to comply, having failed to enforce its will on the battlefield. That's the nature of war and unequal treaties: the loser can implicitly loses some of that Westphalian sovereignty - and supremacy of its own laws on its territory - everyone is so fond to talk about. And that's before we get into how much of a farce "the territories" in question are in this case.
This could be done in several ways:
Putin losing power and his successor rejecting his annexation.
Putin finding a technicality with the annexation process, blaming others, and walking it back. Just like he is blaming MoD for battlefield failures and draft bureaucrats for mobilization errors.
Arranging for new referendums and recognizing their outcome. Ukraine would probably not go for that and Russia would not want to expose their 90%+ claims for outright fraud.
A tit for tat, where say Russia gets an internationally-recognized Crimea and returns the rest.
Amending the constitution. That seems overkill, since it would seem to open the door for ceding actual parts of Russia in the future. Unlike everyone else, I see that as the least likely option as it brings genuine long term risk to Russian territorial integrity.
...other ways, the end is more relevant than the means...
Putin has shown a great capacity to disregard Russian law. In the way he has been running elections. And in the way people have been drafted and sent to die in a non-war. He can make this work, if he has to, he has that level of control over the state.
Would the Russian people, at that point care overmuch about the pretense that these are actually Russian territories? And somehow stop Putin from making those concessions? Really? This Putin, the one who is pulling all the strings and disregarding Russian laws?
Point is, if the war is lost, then Russia will have to find a way. The only real problem is that Putin would lose face and may find that risks to his own personal political survival justifies keeping that war going far past any hope for Russia to win.
No, halt to combats does not need a peace treaty and a peace treaty/ceasefire may not address the annexations.
Russia could just be booted out back to its territory and sulk while not engaging in actual combat (no opinion on where Crimea figures in this).
Another possibility is that there is a ceasefire, without Russia actually giving up its claims.
These variations might work, but would sanctions get lifted sufficiently to make this viable long term for Russia?
IF the war is lost, then Russia will just have to suck it up and make adjustments, just like other countries have had to do when losing wars. If the war is not conclusively lost then Russia has limited reasons to worry about un-annexation, except if it wants to be a good neighbor.
p.s. this is all predicated on the war being conclusively won by Ukraine. Which is a bit early to call though on current extrapolation Russia is losing, big time.
p.p.s. and the reverse equally applies to Ukraine, should they lose big time - their own constitutional prohibitions about territory cessions will have to be worked around.