Thank you for your post.
I am unable to replicate the issue using FileMaker Pro 16.0.1 under Windows 7, Windows 10 and macOS Sierra 10.12.4. Each time after I return from another application (Mail or Internet Explorer), the script window is still present.
Do you have any plug-ins installed? To get back to FileMaker Pro, are you clicking the FileMaker Pro icon or are you clicking on a window in FileMaker Pro?