### 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("get_texture"), &Viewport::get_texture);
	ClassDB::bind_method(D_METHOD("set_physics_object_picking", "enable"), &Viewport::set_physics_object_picking);
	ClassDB::bind_method(D_METHOD("get_physics_object_picking"), &Viewport::get_physics_object_picking);
	ClassDB::bind_method(D_METHOD("set_physics_object_picking_sort", "enable"), &Viewport::set_physics_object_picking_sort);
	ClassDB::bind_method(D_METHOD("get_physics_object_picking_sort"), &Viewport::get_physics_object_picking_sort);
	ClassDB::bind_method(D_METHOD("get_viewport_rid"), &Viewport::get_viewport_rid);
	ClassDB::bind_method(D_METHOD("push_text_input", "text"), &Viewport::push_text_input);
	ClassDB::bind_method(D_METHOD("push_input", "event", "in_local_coords"), &Viewport::push_input, DEFVAL(false));
#ifndef DISABLE_DEPRECATED
	ClassDB::bind_method(D_METHOD("push_unhandled_input", "event", "in_local_coords"), &Viewport::push_unhandled_input, DEFVAL(false));
#endif 
	ClassDB::bind_method(D_METHOD("get_camera_2d"), &Viewport::get_camera_2d);
	ClassDB::bind_method(D_METHOD("set_as_audio_listener_2d", "enable"), &Viewport::set_as_audio_listener_2d);
	ClassDB::bind_method(D_METHOD("is_audio_listener_2d"), &Viewport::is_audio_listener_2d);
	ClassDB::bind_method(D_METHOD("get_mouse_position"), &Viewport::get_mouse_position);
	ClassDB::bind_method(D_METHOD("warp_mouse", "position"), &Viewport::warp_mouse);
	ClassDB::bind_method(D_METHOD("update_mouse_cursor_state"), &Viewport::update_mouse_cursor_state);
	ClassDB::bind_method(D_METHOD("gui_get_drag_data"), &Viewport::gui_get_drag_data);
	ClassDB::bind_method(D_METHOD("gui_is_dragging"), &Viewport::gui_is_dragging);
	ClassDB::bind_method(D_METHOD("gui_is_drag_successful"), &Viewport::gui_is_drag_successful);
	ClassDB::bind_method(D_METHOD("gui_release_focus"), &Viewport::gui_release_focus);
	ClassDB::bind_method(D_METHOD("gui_get_focus_owner"), &Viewport::gui_get_focus_owner);
	ClassDB::bind_method(D_METHOD("set_disable_input", "disable"), &Viewport::set_disable_input);
	ClassDB::bind_method(D_METHOD("is_input_disabled"), &Viewport::is_input_disabled);
	ClassDB::bind_method(D_METHOD("_gui_remove_focus_for_window"), &Viewport::_gui_remove_focus_for_window);
	ClassDB::bind_method(D_METHOD("_post_gui_grab_click_focus"), &Viewport::_post_gui_grab_click_focus);
	ClassDB::bind_method(D_METHOD("set_positional_shadow_atlas_size", "size"), &Viewport::set_positional_shadow_atlas_size);
	ClassDB::bind_method(D_METHOD("get_positional_shadow_atlas_size"), &Viewport::get_positional_shadow_atlas_size);
	ClassDB::bind_method(D_METHOD("set_positional_shadow_atlas_16_bits", "enable"), &Viewport::set_positional_shadow_atlas_16_bits);
	ClassDB::bind_method(D_METHOD("get_positional_shadow_atlas_16_bits"), &Viewport::get_positional_shadow_atlas_16_bits);