I'm using a ThreadWithProgressWindow in my application.
This one grabs the keyboard focus by default by using enterModalState without any argument.
In standalone, the focus is given back to the main window when the ThreadWithProgressWindow is closed but in plugin, the focus it not given back (happen on both OSX and Windows)
I have not seen this problem. I use a ThreadWIthProgessWindow with keyboard events but my main plugin window has jucePluginRequiresKeyboardFocus = false.
As you have probably experienced, these things can be different for each host. What hosts are you having this problem with?
Good request, though I'm sure that you could already do that, at least with AlertWindow, if you manually added it to a parent - it's only a Component after all.