### Godot version

v4.2.dev.custom_build [16a93563b]

### System information

Godot v4.2.dev (16a93563b) - Linux Mint 21.2 (Victoria) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 Ti (nvidia; 525.125.06) - Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz (4 Threads)

### Issue description



https://github.com/godotengine/godot/assets/30386067/335cd974-1261-4c88-829c-159a771eaae3

When dragging the mouse in the inspector to modify a value, the editor would crash if the left mouse button was released.


```
ERROR: FATAL: DEV_ASSERT failed  "!root->gui.windowmanager_window_over" is false.
   at: _event_callback (scene/main/window.cpp:675)
```

<details><summary>Crash log</summary>

```
================================================================
handle_crash: Program crashed with signal 4
Engine version: Godot Engine v4.2.dev.custom_build (16a93563bfd3b02ca0a8f6df2026f3a3217f5571)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f765fc42520] (??:0)
[2] Window::_event_callback(DisplayServer::WindowEvent) (/opt/godot/godot-editor-l10n/godot/scene/main/window.cpp:675)
[3] void call_with_variant_args_helper<Window, DisplayServer::WindowEvent, 0ul>(Window*, void (Window::*)(DisplayServer::WindowEvent), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/opt/godot/godot-editor-l10n/godot/./core/variant/binder_common.h:308)
[4] void call_with_variant_args<Window, DisplayServer::WindowEvent>(Window*, void (Window::*)(DisplayServer::WindowEvent), Variant const**, int, Callable::CallError&) (/opt/godot/godot-editor-l10n/godot/./core/variant/binder_common.h:418)
[5] CallableCustomMethodPointer<Window, DisplayServer::WindowEvent>::call(Variant const**, int, Variant&, Callable::CallError&) const (/opt/godot/godot-editor-l10n/godot/./core/object/callable_method_pointer.h:105)
[6] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/opt/godot/godot-editor-l10n/godot/core/variant/callable.cpp:51)
[7] DisplayServerX11::_send_window_event(DisplayServerX11::WindowData const&, DisplayServer::WindowEvent) (/opt/godot/godot-editor-l10n/godot/platform/linuxbsd/x11/display_server_x11.cpp:3771)
[8] DisplayServerX11::mouse_set_mode(DisplayServer::MouseMode) (/opt/godot/godot-editor-l10n/godot/platform/linuxbsd/x11/display_server_x11.cpp:383)
[9] DisplayServer::_input_set_mouse_mode(Input::MouseMode) (/opt/godot/godot-editor-l10n/godot/servers/display_server.cpp:944)
[10] Input::set_mouse_mode(Input::MouseMode) (/opt/godot/godot-editor-l10n/godot/core/input/input.cpp:90)
[11] EditorSpinSlider::gui_input(Ref<InputEvent> const&) (/opt/godot/godot-editor-l10n/godot/editor/gui/editor_spin_slider.cpp:81)
[12] Control::_call_gui_input(Ref<InputEvent> const&) (/opt/godot/godot-editor-l10n/godot/scene/gui/control.cpp:1806)
[13] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (/opt/godot/godot-editor-l10n/godot/scene/main/viewport.cpp:1562)
[14] Viewport::_gui_input_event(Ref<InputEvent>) (/opt/godot/godot-editor-l10n/godot/scene/main/viewport.cpp:1831)
[15] Viewport::push_input(Ref<InputEvent> const&, bool) (/opt/godot/godot-editor-l10n/godot/scene/main/viewport.cpp:3128)
[16] Window::_window_input(Ref<InputEvent> const&) (/opt/godot/godot-editor-l10n/godot/scene/main/window.cpp:1482)
[17] void call_with_variant_args_helper<Window, Ref<InputEvent> const&, 0ul>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/opt/godot/godot-editor-l10n/godot/./core/variant/binder_common.h:303)
[18] void call_with_variant_args<Window, Ref<InputEvent> const&>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, int, Callable::CallError&) (/opt/godot/godot-editor-l10n/godot/./core/variant/binder_common.h:418)
[19] CallableCustomMethodPointer<Window, Ref<InputEvent> const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (/opt/godot/godot-editor-l10n/godot/./core/object/callable_method_pointer.h:105)
[20] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/opt/godot/godot-editor-l10n/godot/core/variant/callable.cpp:51)
[21] DisplayServerX11::_dispatch_input_event(Ref<InputEvent> const&) (/opt/godot/godot-editor-l10n/godot/platform/linuxbsd/x11/display_server_x11.cpp:3751)
[22] DisplayServerX11::_dispatch_input_events(Ref<InputEvent> const&) (/opt/godot/godot-editor-l10n/godot/platform/linuxbsd/x11/display_server_x11.cpp:3723)
[23] Input::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/opt/godot/godot-editor-l10n/godot/core/input/input.cpp:721)
[24] Input::flush_buffered_events() (/opt/godot/godot-editor-l10n/godot/core/input/input.cpp:979)
[25] DisplayServerX11::process_events() (/opt/godot/godot-editor-l10n/godot/platform/linuxbsd/x11/display_server_x11.cpp:4819)
[26] OS_LinuxBSD::run() (/opt/godot/godot-editor-l10n/godot/platform/linuxbsd/os_linuxbsd.cpp:908)
[27] /opt/godot/godot/bin/godot.linuxbsd.editor.dev.x86_64.llvm(main+0x1fe) [0x560f366a986e] (/opt/godot/godot-editor-l10n/godot/platform/linuxbsd/godot_linuxbsd.cpp:74)
[28] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f765fc29d90] (??:0)
[29] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f765fc29e40] (??:0)
[30] /opt/godot/godot/bin/godot.linuxbsd.editor.dev.x86_64.llvm(_start+0x25) [0x560f366a95a5] (??:?)
-- END OF BACKTRACE --
================================================================
```
</details> 

This seems to be a regression from #67791.

### Steps to reproduce

1. Click on the number field with the left mouse button;
2. Drag the mouse to change the value;
3. The editor will crash when the left mouse button is released.

### Minimal reproduction project

N/A
DisplayServer *ds = memnew(DisplayServerX11(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_position, p_resolution, p_screen, r_error));
	if (r_error != OK) {
		if (p_rendering_driver == "vulkan") {
			String executable_name = OS::get_singleton()->get_executable_path().get_file();
			OS::get_singleton()->alert(
					vformat("Your video card drivers seem not to support the required Vulkan version.\n\n"
							"If possible, consider updating your video card drivers or using the OpenGL 3 driver.\n\n"
							"You can enable the OpenGL 3 driver by starting the engine from the\n"
							"command line with the command:\n\n    \"%s\" --rendering-driver opengl3\n\n"
							"If you recently updated your video card drivers, try rebooting.",
							executable_name),
					"Unable to initialize Vulkan video driver");
		} else {
			OS::get_singleton()->alert(
					"Your video card drivers seem not to support the required OpenGL 3.3 version.\n\n"
					"If possible, consider updating your video card drivers.\n\n"
					"If you recently updated your video card drivers, try rebooting.",
					"Unable to initialize OpenGL video driver");
		}
	}
	return ds;
}
DisplayServerX11::WindowID DisplayServerX11::_create_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect) {