Dialog swallower stuck

I’ve had this error happen with the Keynote manager tool and with my own tool that uses the PostCommandAndUpdateNewElementProperties method in pyrevit. I don’t know how to reproduce it, but once in a while the script will bug out and the dialog swallower that facilitates the placing and updating of keynotes will get stuck and not unsubscribe, thus allowing the swallower to continue to execute, even when the script is finished.

My question is, is there a way to disable this or unsubscribe from outside the context of the original script? Like maybe with another kind of “use in case of emergency” script? Or does the fix requre a restart of Revit?