### 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)

node_threading_disabled = p_disable;
}
SceneTree::SceneTree() {
	if (singleton == nullptr) {
		singleton = this;
	}
	debug_collisions_color = GLOBAL_DEF("debug/shapes/collision/shape_color", Color(0.0, 0.6, 0.7, 0.42));
	debug_collision_contact_color = GLOBAL_DEF("debug/shapes/collision/contact_color", Color(1.0, 0.2, 0.1, 0.8));
	debug_paths_color = GLOBAL_DEF("debug/shapes/paths/geometry_color", Color(0.1, 1.0, 0.7, 0.4));
	debug_paths_width = GLOBAL_DEF("debug/shapes/paths/geometry_width", 2.0);
	collision_debug_contacts = GLOBAL_DEF(PropertyInfo(Variant::INT, "debug/shapes/collision/max_contacts_displayed", PROPERTY_HINT_RANGE, "0,20000,1"), 10000);
	GLOBAL_DEF("debug/shapes/collision/draw_2d_outlines", true);
	process_group_call_queue_allocator = memnew(CallQueue::Allocator(64));
	Math::randomize();
	
	root = memnew(Window);
	root->set_min_size(Size2i(64, 64)); 
	root->set_process_mode(Node::PROCESS_MODE_PAUSABLE);
	root->set_name("root");
	root->set_title(GLOBAL_GET("application/config/name"));
	if (Engine::get_singleton()->is_editor_hint()) {
		root->set_wrap_controls(true);
	}
#ifndef _3D_DISABLED
	if (!root->get_world_3d().is_valid()) {
		root->set_world_3d(Ref<World3D>(memnew(World3D)));