It's not explicitly documented but, it should be common knowledge that, any change that would cause in a change to any of the .BGL installed in the sim, should always be done with the simulator closed.
The issue is, while the Control Panel can check if the sim is still running before you hit the Compile button, it cannot prevent you from restarting it too quickly, for example in a middle of a compilation, and forcing it quit if it happens might be dangerous.