Nope. It might fix the issue of not deleting the run script but it causes the console window to be closed immediately and so the user has no chance to see any output.
I personally don't consider the described case of closing the console window using the [x] as a bug in Geany but rather an unsupported use case. In the console window there is clearly stated "press any KEY".
Furthermore, I'm not sure if it is what the OP originally meant.