Script action editor can get stuck, unable to close

I’m likely running into this as I’m rapidly adding/editing Drafts actions as a new(ish) user, but I’ve managed to get Drafts into a state where I have to force quit multiple times.

To reproduce: open Manage Actions, open an action with a Script step, click Edit to open the script editor. If you then switch to Safari and install an action from the directory with the editor window still open, you then cannot Cancel or Save, or close the parent Edit Action window.

drafts-stuck-reproduce