Just an additional info - I'm not interacting manually in any way. Whatever interaction is happening is via BTT's internal mechanisms (like focus text field etc.) + the actual HTML/JS code. So even if I show and hide the floating menu, with no manual actions on my end, BTT remains the active app.
any of the focus options can also activate BTT, so as soon as any part of the window is able to retrieve keyboard input, BTT will also receive the cmd+Q.
I'll check the "activate previous app" on close later! (the clipboard manager also uses that, I think I can mostly reuse that implementation)
I added something in 5.493, I'm not yet sure whether it has any side effects. It should switch to the previously active app if the currently active app is BTT and a floating menu is closed / hidden