### Godot version

master [75f9c97deaa8378477441e07ea1782ecab6d2eca]

### System information

Godot v4.2.dev (262d1eaa6) - Ubuntu 20.04.6 LTS (Focal Fossa) - X11 - Vulkan (Forward+) - dedicated AMD Radeon RX 6800 XT - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)

### Issue description

Running a dev build on both Linux and Windows reaches the following crash:

```
TextServer: Primary interface set to: "ICU / HarfBuzz / Graphite (Built-in)".
CORE API HASH: 2795494918
EDITOR API HASH: 1481585570
ERROR: FATAL: DEV_ASSERT failed  "!api_hashes_cache.has(p_api)" is false.
   at: set_current_api (core/object/class_db.cpp:59)
```

Call stack (Linux):

```
1 ClassDB::set_current_api                class_db.cpp        59   0x9c77bf6 
2 EditorSettings::ensure_class_registered editor_settings.cpp 883  0x639a96a 
3 EditorNode::EditorNode                  editor_node.cpp     6825 0x61badd9 
4 Main::start                             main.cpp            3085 0x4a6e353 
5 main                                    godot_linuxbsd.cpp  72   0x49c9d0d 
```

Call stack (Windows):

```
>	godot.windows.editor.dev.x86_64.exe!ClassDB::set_current_api(ClassDB::APIType p_api) Line 58	C++
 	godot.windows.editor.dev.x86_64.exe!EditorSettings::ensure_class_registered() Line 886	C++
 	godot.windows.editor.dev.x86_64.exe!EditorNode::EditorNode() Line 6826	C++
 	godot.windows.editor.dev.x86_64.exe!Main::start() Line 3085	C++
 	godot.windows.editor.dev.x86_64.exe!widechar_main(int argc, wchar_t * * argv) Line 179	C++
 	godot.windows.editor.dev.x86_64.exe!_main() Line 204	C++
 	godot.windows.editor.dev.x86_64.exe!main(int argc, char * * argv) Line 218	C++
 	godot.windows.editor.dev.x86_64.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 232	C++
 	[Inline Frame] godot.windows.editor.dev.x86_64.exe!invoke_main() Line 102	C++
```


### Steps to reproduce

Compile with (possibly not all of those flags are needed):

`scons platform=linuxbsd optimize=none debug_symbols=True tests=False dev_mode=True dev_build=True use_llvm=yes use_lld=yes  opengl3=no openxr=no`

Open a project on the editor with:

Working folder: The project's path
Arguments: `-e --verbose`

**The --verbose argument is important!**

### Other info (for bisect)

It must've broken somewhere between 75f9c97deaa8378477441e07ea1782ecab6d2eca and 6588a4a29af1621086feac0117d5d4d37af957fd since it was working fine before that.

**Update:** It's possible I'm wrong about the bisecting info, because the problem started when I added `--verbose` to the cmd line.

### Workaround

Just commenting out the assert runs fine.

### Minimal reproduction project

Any.
}
	editor_data.add_edited_scene(-1);
	editor_data.set_edited_scene(0);
	_update_scene_tabs();
	ImportDock::get_singleton()->initialize_import_options();
	FileAccess::set_file_close_fail_notify_callback(_file_access_close_error_notify);
	print_handler.printfunc = _print_handler;
	print_handler.userdata = this;
	add_print_handler(&print_handler);
	ResourceSaver::set_save_callback(_resource_saved);
	ResourceLoader::set_load_callback(_resource_loaded);
	
	ED_SHORTCUT_AND_COMMAND("editor/editor_2d", TTR("Open 2D Editor"), KeyModifierMask::CTRL | Key::F1);
	ED_SHORTCUT_AND_COMMAND("editor/editor_3d", TTR("Open 3D Editor"), KeyModifierMask::CTRL | Key::F2);
	ED_SHORTCUT_AND_COMMAND("editor/editor_script", TTR("Open Script Editor"), KeyModifierMask::CTRL | Key::F3);
	ED_SHORTCUT_AND_COMMAND("editor/editor_assetlib", TTR("Open Asset Library"), KeyModifierMask::CTRL | Key::F4);
	ED_SHORTCUT_OVERRIDE("editor/editor_2d", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::KEY_1);
	ED_SHORTCUT_OVERRIDE("editor/editor_3d", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::KEY_2);
	ED_SHORTCUT_OVERRIDE("editor/editor_script", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::KEY_3);
	ED_SHORTCUT_OVERRIDE("editor/editor_assetlib", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::KEY_4);
	ED_SHORTCUT_AND_COMMAND("editor/editor_next", TTR("Open the next Editor"));
	ED_SHORTCUT_AND_COMMAND("editor/editor_prev", TTR("Open the previous Editor"));
	screenshot_timer = memnew(Timer);
	screenshot_timer->set_one_shot(true);
	screenshot_timer->set_wait_time(settings_menu->get_submenu_popup_delay() + 0.1f);
	screenshot_timer->connect("timeout", callable_mp(this, &EditorNode::_request_screenshot));
	add_child(screenshot_timer);
	screenshot_timer->set_owner(get_owner());
	
	int max_w = MAX(project_run_bar->get_minimum_size().x + right_menu_hb->get_minimum_size().x, main_menu->get_minimum_size().x);