Hey! I looked into this 3 months ago, replying about it here as well for future travellers, it’s related to this gnome bug (or behaviour):
The problem is exactly as described in comment #4 in the launchpad link.
There is no fix yet (2023/03) but the gnome extension to “disable force quit or wait window” does work as a workaround. (Forum won’t let me add another URL since this is a new account).
If you can mark that bug as affecting you and maybe posting a comment to add pressure for the bug to get fixed it would be great.