Then again, the Ukranians have endured almost 3 years of deprivation, inflation, loss of freedoms, conscription, and the deaths of loved ones. There might be a strong political will to exploit a peace dividend after a ceasefire, rather than remaining in a martial-law existential-threat wartime economy forever.
There would be political pressure to make up for shortages of things like housing, infrastructure, healthcare services, education, and the consumer economy. So I think a post-war Ukraine probably maintains high military spending compared to the rest of Europe, but diverts some amount of its government funding, labor, and resources toward rebuilding civilian life.
Their internal debates will be fierce. Russia and Putin are still there, regrouping their own military and developing new technologies like AI drones and ballistic missiles with EW capabilities for the next attack.
Ukraine will be in a much worse spot strategically, because their border with Russian-occupied land will be much longer than it was before the war and because they've lost so much of their agricultural and industrial resource base. U.S. political/military support is already gone and European NATO members will be urgently tending their own military affairs. Debt service will be a problem.
Hawks will argue that Ukraine must devote the bulk of its GDP to defending against the next inevitable invasion. Doves and much of the exhausted population will advocate for rebuilding. Hawks would ask what's the point of rebuilding civilian infrastructure for the Russians to bomb again in 2-3 years. Doves will ask what's the point of the last war if civilian life and culture will never be restored.
I'm guessing a compromise will land somewhere in the middle, as it always does in democracies with competing priorities. Ukraine will be a heavily militarized country for decades to come, if they survive the next invasion, but they will have to devote some resources to reconstruction and civilian interests. Any unemployment or financial slack in the civilian economy will be taken up by the military.
On the Russian side, they could become a North Korean style communist state on a permanent war footing. In 3-5 years their military will be rebuilt with the next generation of children aging into early adulthood. Those kids will build the tanks and trucks and drones in government factories, and then bring them into battle when they are drafted for the next round of war with Ukraine. This near-100% focus on war could put Russia at an advantage in the next phase of the invasion.