I can't use the pause function of the editor next to the start button after add a GDScript, It will freeze.And the debug function is the same.When the program reaches a breakpoint, it will also freeze and I have to stop it by the editor.
Steps to reproduce
1.create a node2D named Main
2.start the game and pause, it goes OK
3.add a GDScript to the Main
4.start the game and pause, it stuck and froze
Tested versions
v4.2.2 stable
System information
Win11, Laptop3060
Issue description
I can't use the pause function of the editor next to the start button after add a GDScript, It will freeze.And the debug function is the same.When the program reaches a breakpoint, it will also freeze and I have to stop it by the editor.
Steps to reproduce
1.create a node2D named Main 2.start the game and pause, it goes OK 3.add a GDScript to the Main 4.start the game and pause, it stuck and froze
https://github.com/godotengine/godot/assets/94156667/72595ab4-3fe5-4b16-8311-9d875ecda973
Minimal reproduction project (MRP)
Test.zip