### Godot version

master

### System information

> Starting from Godot 4.1, you can copy this information to your clipboard by using Help > Copy System Info at the top of the editor window.

This crashed my editor 😆 

### Issue description


```
================================================================
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.1.dev.mono.custom_build (72f7131be1be81e3b8c3d45732d55e5765b95dde)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] EditorNode::_get_system_info (C:\Users\zaevi\source\Godot\godot-source\editor\editor_node.cpp:4378)
[1] EditorNode::_menu_option_confirm (C:\Users\zaevi\source\Godot\godot-source\editor\editor_node.cpp:2900)
[2] CallableCustomMethodPointer<EditorNode,int>::call (C:\Users\zaevi\source\Godot\godot-source\core\object\callable_method_pointer.h:105)
[3] Callable::callp (C:\Users\zaevi\source\Godot\godot-source\core\variant\callable.cpp:51)
[4] Object::emit_signalp (C:\Users\zaevi\source\Godot\godot-source\core\object\object.cpp:1069)
[5] Node::emit_signalp (C:\Users\zaevi\source\Godot\godot-source\scene\main\node.cpp:3568)
[6] Object::emit_signal<int> (C:\Users\zaevi\source\Godot\godot-source\core\object\object.h:891)
[7] PopupMenu::activate_item (C:\Users\zaevi\source\Godot\godot-source\scene\gui\popup_menu.cpp:1822)
[8] PopupMenu::gui_input (C:\Users\zaevi\source\Godot\godot-source\scene\gui\popup_menu.cpp:453)
[9] CallableCustomMethodPointer<PopupMenu,Ref<InputEvent> const &>::call (C:\Users\zaevi\source\Godot\godot-source\core\object\callable_method_pointer.h:104)
[10] Callable::callp (C:\Users\zaevi\source\Godot\godot-source\core\variant\callable.cpp:51)
[11] Object::emit_signalp (C:\Users\zaevi\source\Godot\godot-source\core\object\object.cpp:1069)
[12] Node::emit_signalp (C:\Users\zaevi\source\Godot\godot-source\scene\main\node.cpp:3568)
[13] Window::_window_input (C:\Users\zaevi\source\Godot\godot-source\scene\main\window.cpp:1458)
[14] CallableCustomMethodPointer<Window,Ref<InputEvent> const &>::call (C:\Users\zaevi\source\Godot\godot-source\core\object\callable_method_pointer.h:104)
[15] Callable::callp (C:\Users\zaevi\source\Godot\godot-source\core\variant\callable.cpp:51)
[16] DisplayServerWindows::_dispatch_input_event (C:\Users\zaevi\source\Godot\godot-source\platform\windows\display_server_windows.cpp:2369)
[17] Input::_parse_input_event_impl (C:\Users\zaevi\source\Godot\godot-source\core\input\input.cpp:708)
[18] Input::flush_buffered_events (C:\Users\zaevi\source\Godot\godot-source\core\input\input.cpp:967)
[19] DisplayServerWindows::process_events (C:\Users\zaevi\source\Godot\godot-source\platform\windows\display_server_windows.cpp:2063)
[20] OS_Windows::run (C:\Users\zaevi\source\Godot\godot-source\platform\windows\os_windows.cpp:1478)
[21] widechar_main (C:\Users\zaevi\source\Godot\godot-source\platform\windows\godot_windows.cpp:181)
[22] _main (C:\Users\zaevi\source\Godot\godot-source\platform\windows\godot_windows.cpp:205)
[23] main (C:\Users\zaevi\source\Godot\godot-source\platform\windows\godot_windows.cpp:217)
[24] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[25] <couldn't map PC to fn name>
-- END OF BACKTRACE --
================================================================
```

### Steps to reproduce

Change renderer to `gl_compatibility` and click `Help > Copy System Info`

### Minimal reproduction project

N/A
WindowWrapper *wrapper = Object::cast_to<WindowWrapper>(p_dock);
	if (!wrapper) {
		_dock_make_float(p_dock, p_slot_index, false);
		wrapper = floating_docks[floating_docks.size() - 1];
	}
	wrapper->restore_window_from_saved_position(
			p_dock_dump.get("window_rect", Rect2i()),
			p_dock_dump.get("window_screen", -1),
			p_dock_dump.get("window_screen_rect", Rect2i()));
}
void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String &p_section) {
	Dictionary floating_docks_dump = p_layout->get_value(p_section, "dock_floating", Dictionary());
	bool restore_window_on_load = EDITOR_GET("interface/multi_window/restore_windows_on_load");
	for (int i = 0; i < DOCK_SLOT_MAX; i++) {
		if (!p_layout->has_section_key(p_section, "dock_" + itos(i + 1))) {
			continue;
		}
		Vector<String> names = String(p_layout->get_value(p_section, "dock_" + itos(i + 1))).split(",");
		for (int j = names.size() - 1; j >= 0; j--) {
			String name = names[j];
			
			int atidx = -1;
			Control *node = nullptr;
			for (int k = 0; k < DOCK_SLOT_MAX; k++) {
				if (!dock_slot[k]->has_node(name)) {
					continue;
				}
				node = Object::cast_to<Control>(dock_slot[k]->get_node(name));
				if (!node) {
					continue;