While working on
GROOVY-10077 I found out, that there is actual a use case for allowing static variables in a script when executed in the same JVM instance.
One can always have a workaround like this:
For example groovy.console.ui.view.MacOSXMenuBar.groovy had orgininally this code:
...which was replaced with
GROOVY-3768 by this code (and made the variable useless for the originally intented purpose):