Fix heap-use-after-free when closing a scene with its builtin script open
Fix heap-use-after-free when closing a scene with its builtin script open

guilhermefelipecgs/godot,godotengine/godot,godotengine/godot,ZuBsPaCe/godot,guilhermefelipecgs/godot,sanikoyes/godot,ZuBsPaCe/godot,akien-mga/godot,vkbsb/godot,josempans/godot,firefly2442/godot,ZuBsPaCe/godot,Zylann/godot,Zylann/godot,sanikoyes/godot,Shockblast/godot,guilhermefelipecgs/godot,firefly2442/godot,Valentactive/godot,sanikoyes/godot,guilhermefelipecgs/godot,guilhermefelipecgs/godot,godotengine/godot,ZuBsPaCe/godot,firefly2442/godot,josempans/godot,pkowal1982/godot,firefly2442/godot,guilhermefelipecgs/godot,vkbsb/godot,Valentactive/godot,BastiaanOlij/godot,firefly2442/godot,vkbsb/godot,godotengine/godot,ZuBsPaCe/godot,Shockblast/godot,sanikoyes/godot,josempans/godot,firefly2442/godot,BastiaanOlij/godot,godotengine/godot,Zylann/godot,Shockblast/godot,pkowal1982/godot,Zylann/godot,Valentactive/godot,sanikoyes/godot,akien-mga/godot,sanikoyes/godot,ZuBsPaCe/godot,vkbsb/godot,ZuBsPaCe/godot,BastiaanOlij/godot,vkbsb/godot,Valentactive/godot,pkowal1982/godot,pkowal1982/godot,firefly2442/godot,Shockblast/godot,pkowal1982/godot,Zylann/godot,pkowal1982/godot,akien-mga/godot,Valentactive/godot,Shockblast/godot,Zylann/godot,guilhermefelipecgs/godot,akien-mga/godot,BastiaanOlij/godot,godotengine/godot,josempans/godot,BastiaanOlij/godot,ZuBsPaCe/godot,godotengine/godot,vkbsb/godot,vkbsb/godot,Valentactive/godot,sanikoyes/godot,firefly2442/godot,josempans/godot,Shockblast/godot,josempans/godot,akien-mga/godot,josempans/godot,Valentactive/godot,Shockblast/godot,josempans/godot,Valentactive/godot,Shockblast/godot,pkowal1982/godot,pkowal1982/godot,akien-mga/godot,BastiaanOlij/godot,Zylann/godot,vkbsb/godot,Zylann/godot,BastiaanOlij/godot,guilhermefelipecgs/godot,akien-mga/godot,BastiaanOlij/godot,akien-mga/godot,godotengine/godot,sanikoyes/godot