Repository: godot
Issue: ResourceLoader.load_threaded_request use_sub_threads = true causes Player to crash semi-randomly
Labels: bug,topic:editor,crash

### Godot version

4.2 Beta 3, 4.2rc2

### System information

Godot v4.2.beta3 - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.3758) - Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 Threads)

### Issue description

Note: This issue may be related to https://github.com/godotengine/godot/issues/78734.  While that issue had resolved for me personally, (first in https://github.com/godotengine/godot/pull/78974 and later in https://github.com/godotengine/godot/pull/85039), I believe this new issue is being caused by something else.  The behavior around this crash is different.  It may center around how the **ResourceLoader.load_threaded_request**  uses sub-threads to unpack more complex scenes or scenes that contain other scenes.  If you need me to provide more information or more detailed crash dumps, let me know.

When I try to load a specific level in my game, the Player crashes to desktop.  This has happened across three different computers, three different versions (4.1.2, 4.2b3, 4.2rc2) and two environments (Windows, Linux).

When I try to attempt to start the game again, there is a chance it may work.  The functionality of the level loading successfully is unpredictable but I've noticed several factors:

- It tends to happen when I've just loaded or reloaded the project, or have made a change to the scene, however significant.
- It might load successfully after the first or second failure.
- It only happens on certain levels which are more complex, not others.
- It might work successfully until I've substantially changed something, reset or reloaded the project.
- The crash occurs before any of the scripts in the scene enter _init(), so there's no way for me to troubleshoot if it's a specific object or script in the scene.  Based on the info I've gleaned, the crash seems to happen as it's doing a threaded request on a file as it's assembling it into a PackedScene for loading.

In the below scene you will see two unsuccessful attempts to load the level, followed by a successful one.  The successful load happened when I switched the visibility of two identical nodes.

**note: more in-depth tests are below in the comments, but it points to the same problem**

![loading thread working](https://github.com/godotengine/godot/assets/9627628/85380a3a-210e-442f-8c80-b8402293e16d)

Windows error:

Faulting application name: Godot_v4.2-beta3_win64.exe, version: 4.2.0.0, time stamp: 0x00000000
Faulting module name: Godot_v4.2-beta3_win64.exe, version: 4.2.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x00000000002ee662
Faulting process id: 0x0x282C
Faulting application start time: 0x0x1DA08139EF66271
Faulting application path: C:\Users\gregh\AppData\Roaming\Godot\app_userdata\Godot Version Manager\versions\Godot_v4.2-beta3_win64.exe
Faulting module path: C:\Users\gregh\AppData\Roaming\Godot\app_userdata\Godot Version Manager\versions\Godot_v4.2-beta3_win64.exe
Report Id: 90acc9f6-6ec0-4952-889d-b89f59e423a5
Faulting package full name: 
Faulting package-relative application ID: 

### Steps to reproduce

[Download the scene here, also posted below.](https://drive.google.com/file/d/1RyYXXfNBQH0NyrQ1hrwYmTi8Up4hYIMS/view?usp=sharing)

Press F5 top run the game.

Start a new game and follow the prompts.

Notice that the scene either runs or crashes.

Quit the game manually.

Try this ten times.  Try making some minor changes in the scene.  Several attempts should reveal that there is no consistency to whether the level to loads or the game to crashes.

### Minimal reproduction project

[Download the scene here, also posted above.](https://drive.google.com/file/d/1RyYXXfNBQH0NyrQ1hrwYmTi8Up4hYIMS/view?usp=sharing)