### Godot version

4.1.beta3, 4.0.3.stable

### System information

Godot v4.1.beta3 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Ti (NVIDIA; 31.0.15.3598) - Intel(R) Core(TM) i5-8600K CPU @ 3.60GHz (6 Threads)

### Issue description

The game crashes on a Windows export without "Export with Debug" when I use VideoStreamPlayer node as a background in my scene.

I have created 2 simple scenes with VideoStreamPlayer and a button in each to switch between them. When I run the game in the editor, it works fine, when I export it with debug it works fine. As soon as I untick "Export with Debug" the game crashes randomly, sometimes after a few button clicks(changing scenes), sometimes on the first click... The console gives no errors whatsoever...

Tried to do it in both: Godot 4.0.3 and 4.1 beta3, the result is the same. 

I have also recreated this in Godot 3.5.2, the exported game without "Export with Debug" works fine, without crashes at all.

I have spent 4-5 hours yesterday searching internet and trying to fix it, but I couldn't. Tried different ffmpeg builds to convert the video, tried different video framerates, with audio and without audio... Looks like it's a Godot 4 issue.

### Steps to reproduce

1 - create a scene, add VideoStreamPlayer node, assign your video to it.
2 - create another scene with a VideoStreamPlayer node and assign your video to it.
3 - create buttons on each scene to switch between them.
4 - export your project for windows without "Export with Debug"
5 - play the game, after switching the scenes a couple of time, the game will crash.

### Minimal reproduction project

[Crash_Test_3.zip](https://github.com/godotengine/godot/files/11893147/Crash_Test_3.zip)

}
	root->set_as_audio_listener_3d(true);
#endif 
	
	set_multiplayer(MultiplayerAPI::create_default_interface());
	root->set_as_audio_listener_2d(true);
	current_scene = nullptr;
	const int msaa_mode_2d = GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa_2d", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Average),4× (Slow),8× (Slowest)")), 0);
	root->set_msaa_2d(Viewport::MSAA(msaa_mode_2d));
	const int msaa_mode_3d = GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/msaa_3d", PROPERTY_HINT_ENUM, String::utf8("Disabled (Fastest),2× (Average),4× (Slow),8× (Slowest)")), 0);
	root->set_msaa_3d(Viewport::MSAA(msaa_mode_3d));
	const bool transparent_background = GLOBAL_DEF("rendering/viewport/transparent_background", false);
	root->set_transparent_background(transparent_background);
	const int ssaa_mode = GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/anti_aliasing/quality/screen_space_aa", PROPERTY_HINT_ENUM, "Disabled (Fastest),FXAA (Fast)"), 0);
	root->set_screen_space_aa(Viewport::ScreenSpaceAA(ssaa_mode));
	const bool use_taa = GLOBAL_DEF_BASIC("rendering/anti_aliasing/quality/use_taa", false);
	root->set_use_taa(use_taa);
	const bool use_debanding = GLOBAL_DEF("rendering/anti_aliasing/quality/use_debanding", false);
	root->set_use_debanding(use_debanding);
	const bool use_occlusion_culling = GLOBAL_DEF("rendering/occlusion_culling/use_occlusion_culling", false);
	root->set_use_occlusion_culling(use_occlusion_culling);
	float mesh_lod_threshold = GLOBAL_DEF(PropertyInfo(Variant::FLOAT, "rendering/mesh_lod/lod_change/threshold_pixels", PROPERTY_HINT_RANGE, "0,1024,0.1"), 1.0);
	root->set_mesh_lod_threshold(mesh_lod_threshold);
	bool snap_2d_transforms = GLOBAL_DEF("rendering/2d/snap/snap_2d_transforms_to_pixel", false);
	root->set_snap_2d_transforms_to_pixel(snap_2d_transforms);
	bool snap_2d_vertices = GLOBAL_DEF("rendering/2d/snap/snap_2d_vertices_to_pixel", false);
	root->set_snap_2d_vertices_to_pixel(snap_2d_vertices);
	// We setup VRS for the main viewport here, in the editor this will have little effect.
	const int vrs_mode = GLOBAL_DEF(PropertyInfo(Variant::INT, "rendering/vrs/mode", PROPERTY_HINT_ENUM, String::utf8("Disabled,Texture,XR")), 0);
	root->set_vrs_mode(Viewport::VRSMode(vrs_mode));