The Ukrainian constitution does not allow for elections to be held during periods of martial law, which was declared at the start of the war.
If there is ever a good time to declare martial law, being invaded by a neighboring country might qualify as a justifiable time.
In any case, it's constitutional, but Ukrainian political process isn't what we are here to talk about.
Fundamentally, I agree with you - If the majority of Ukrainians were to decide they don't want the war to continue, the war should stop. The number show, however, that the people are not ready to give up.