SubScene stuck on importing after recompiling scripts

I have a subscene in my scene which I am loading and unloading at runtime, but whenever i recompile scripts it gets stuck on importing. When I close and then reopen the project the subscene imports again no problem but as soon as I change a script it gets stuck.


I have tried the advice of switching to release mode and deleting the SceneDependencyCache but it does not help. Any help or suggestions as to how I can fix this would be much appreciated!