### Godot version

4.0.3.stable

### System information

Windows 10/11

### Issue description

I want the player's cursor to change when highlighting pickable Area2Ds; to do this, I have the areas modify the `mouse_default_cursor_shape` property on an external Control when the mouse enters or exits. If another Control appears in front of the Area2D while the mouse is over it, there is a chance that the project will crash.

Nothing prints to the IDE's output on this crash. If running the editor with console, then
```
ERROR: Condition "slot >= slot_max" is true. Returning: nullptr
   at: get_instance (./core/object/object.h:972)
```
will sometimes appear alongside the crash. If it appears, it always appears twice.

When I run a debug build of the editor through WinDbg, WinDbg will catch the following exception:
```
(3b58.2aac): Access violation - code c0000005 (!!! second chance !!!)
godot_windows_editor_x86_64!ObjectDB::get_instance [inlined in godot_windows_editor_x86_64!Viewport::_cleanup_mouseover_colliders+0x6f]:
00007ff6`ac254a1f 488b5310        mov     rdx,qword ptr [rbx+10h] ds:cccccccc`c31c419b=????????????????
```
When using this method, the exception is not random; it always occurs on the first attempt.

### Steps to reproduce

- Open the minimal reproduction project in the editor.
- Run the project.
- Click on the Area2D (you'll want visible collision shapes on).
- A full-screen button will pop up. If the game does not crash at this point, clicking the button will hide it so you can try again. It should crash within a few seconds of mashing.

### Minimal reproduction project

[Crash Test.zip](https://github.com/godotengine/godot/files/12027772/Crash.Test.zip)

ClassDB::bind_method(D_METHOD("set_world_2d", "world_2d"), &Viewport::set_world_2d);
	ClassDB::bind_method(D_METHOD("get_world_2d"), &Viewport::get_world_2d);
	ClassDB::bind_method(D_METHOD("find_world_2d"), &Viewport::find_world_2d);
	ClassDB::bind_method(D_METHOD("set_canvas_transform", "xform"), &Viewport::set_canvas_transform);
	ClassDB::bind_method(D_METHOD("get_canvas_transform"), &Viewport::get_canvas_transform);
	ClassDB::bind_method(D_METHOD("set_global_canvas_transform", "xform"), &Viewport::set_global_canvas_transform);
	ClassDB::bind_method(D_METHOD("get_global_canvas_transform"), &Viewport::get_global_canvas_transform);
	ClassDB::bind_method(D_METHOD("get_final_transform"), &Viewport::get_final_transform);
	ClassDB::bind_method(D_METHOD("get_screen_transform"), &Viewport::get_screen_transform);
	ClassDB::bind_method(D_METHOD("get_visible_rect"), &Viewport::get_visible_rect);
	ClassDB::bind_method(D_METHOD("set_transparent_background", "enable"), &Viewport::set_transparent_background);
	ClassDB::bind_method(D_METHOD("has_transparent_background"), &Viewport::has_transparent_background);
	ClassDB::bind_method(D_METHOD("set_use_hdr_2d", "enable"), &Viewport::set_use_hdr_2d);
	ClassDB::bind_method(D_METHOD("is_using_hdr_2d"), &Viewport::is_using_hdr_2d);
	ClassDB::bind_method(D_METHOD("set_msaa_2d", "msaa"), &Viewport::set_msaa_2d);
	ClassDB::bind_method(D_METHOD("get_msaa_2d"), &Viewport::get_msaa_2d);
	ClassDB::bind_method(D_METHOD("set_msaa_3d", "msaa"), &Viewport::set_msaa_3d);
	ClassDB::bind_method(D_METHOD("get_msaa_3d"), &Viewport::get_msaa_3d);
	ClassDB::bind_method(D_METHOD("set_screen_space_aa", "screen_space_aa"), &Viewport::set_screen_space_aa);
	ClassDB::bind_method(D_METHOD("get_screen_space_aa"), &Viewport::get_screen_space_aa);
	ClassDB::bind_method(D_METHOD("set_use_taa", "enable"), &Viewport::set_use_taa);
	ClassDB::bind_method(D_METHOD("is_using_taa"), &Viewport::is_using_taa);
	ClassDB::bind_method(D_METHOD("set_use_debanding", "enable"), &Viewport::set_use_debanding);
	ClassDB::bind_method(D_METHOD("is_using_debanding"), &Viewport::is_using_debanding);
	ClassDB::bind_method(D_METHOD("set_use_occlusion_culling", "enable"), &Viewport::set_use_occlusion_culling);
	ClassDB::bind_method(D_METHOD("is_using_occlusion_culling"), &Viewport::is_using_occlusion_culling);
	ClassDB::bind_method(D_METHOD("set_debug_draw", "debug_draw"), &Viewport::set_debug_draw);
	ClassDB::bind_method(D_METHOD("get_debug_draw"), &Viewport::get_debug_draw);
	ClassDB::bind_method(D_METHOD("get_render_info", "type", "info"), &Viewport::get_render_info);