Product and version
FileMaker Pro 15.0.2
OS and version
OS X 10.11.6
iMac Retina 5K 27''
If you open a script in a separate windows and then, close the script Workspace by the red button in its windows, the separate window just opened is also closing, which is for sure an unexpected user experience.
How to replicate
Use the yellow button to put the script workspace in the Dock in order to gain screen room, an thus your separate window is not closing.
If it is by design, i would respectfully answer that, IMHO, all user in this world will be surprised the first time she/he come in this situation, and it is too bad.