You're making it sound as if all Ukraine needed to do to end this war is give up the Donbass (and the small land bridge to Crimea), and then they would have lasting peace.
In reality, Russia has long sought far more territory than that. At a minimum Zap and Kharkiv, they would probably also like to take the heavy industries in Dnipro and the prime port location of Odessa. Additionally, Russia has always insisted on demilitarization, "denazification" and neutrality of Rump-Ukraine, relegating them to permanent vassal status.
Fundamentally, this conflict is about Ukraine trying to break away from Russia's sphere of influence and Russia trying to reassert itself. They haven't fought this long and this hard, just to end up with a few small territorial gains (on top of what Russia already controlled in Feb 2022), while the rest of Ukraine joins the West (except for a pinky promise of having no NATO ambitions).
What you're actually getting at is that "Ukraine is slowly but surely losing this war, therefore, they should give up their defunct claims to sovereignty".
Well true in that
half of Ukraine was trying to break away from Russia's sphere of influence and reassert itself. After failing to secure the mandate to do so democratically, they did so autocratically and against the will of the majority half.
The wishes Russia had when they entered the war with a blitz gambit and what peace they're willing to settle for now aren't the same asks. The Ukrainian maximalist position hasn't changed, but they're forfeiting their claim to sovereignty no matter what the outcome. They used to be a vassal state to Russia in the post-soviet era, now they're a vassal state to the EU. The Russians want a demilitarized buffer, the Ukrainians want to seize control of the separatist regions and impose unilateral rule on a hostile population. Subjugating and oppressing them, what else could it be? Its not like they can be rejoined as a democratic nation, the last time they voted together, Yanukovych won. The war has to end at some point and the Ukrainian demand remains an impossible and unworkable one. If tomorrow Russia abruptly changed its mind, revoked its constitution, kicked out the DPR/LPR/Crimea and ceded them to Kyiv, what would happen? You'd still have a bitter ethnic Russian population who would never coexist with West Ukraine. Would the EU send in an occupying army and build internment camps to pacify them?
At any rate, Russia already seized most of the industry. There might be farmlands up for grab and the contested Zap and Kharkiv that Russia hopes to take if this conflict drags on for years, but like we saw last year in the land swaps proposal, they're willing to haggle for peace. They already got the lions share of what they actually wanted. If they had seized the whole of Ukraine in their blitz at the start, they'd have avoided this war of attrition but still been in the same position of trying to pacify a hostile population under occupation, and we can only speculate how that would have gone with the EU needling them and propping up a resistance.
The point of all this is, peace can actually work when the warring sides agree to keep to their sides and lay down their demands to take over the opponents they failed to defeat on a battlefield. And that's how wars end, either you win decisively or you seek terms.