The previous pass in #97567 missed a small window of race condition
in *closing the fecking dialog*. Apparently that's still not
instantaneous enough and it's possible to have the check trigger in
the interval between clicking the button and the dialog being
completely torn down.
Add an explicit test for this to the existing `closeProfileDialog`
utility function.
closesodoo/odoo#97969
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>