Disallow hiding a modal during the save process

Ref p/64734290 b/12911303