Overview
src/components/forms/DynamicFormBuilder.tsx (lines 157-162) awaits submitMutation.mutate(...) then checks submitMutation.isSuccess synchronously to decide whether to clear the auto-save draft. That mutation flag is React state captured in the current render and is still false on this tick, so clearDraft() never runs and stale drafts persist after submission. Clear the draft from the mutation's onSuccess callback (or from the awaited result) instead.
Overview
src/components/forms/DynamicFormBuilder.tsx (lines 157-162) awaits submitMutation.mutate(...) then checks submitMutation.isSuccess synchronously to decide whether to clear the auto-save draft. That mutation flag is React state captured in the current render and is still false on this tick, so clearDraft() never runs and stale drafts persist after submission. Clear the draft from the mutation's onSuccess callback (or from the awaited result) instead.