### Godot version

Latest 4.0.dev (a3a42159e31db27f8ae7c1ecad6a9ed417cb05de)

### System information

Ubuntu 22.04.1 LTS

### Issue description

Ctrl+Shift+F (Find in Files) in the text editor, for example, causes my laptop to freeze consistently. I also reproduced it with F1 and Ctrl+Shift+R, as well as by using the dropdown instead of shortcuts.

### Steps to reproduce

Trivial

### Minimal reproduction project

N/A
im_text = String();
					im_selection = Vector2i();
					OS_Unix::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_OS_IME_UPDATE);
				}
				wd.focused = false;
				Input::get_singleton()->release_pressed_events();
				_send_window_event(wd, WINDOW_EVENT_FOCUS_OUT);
				if (mouse_mode_grab) {
					for (const KeyValue<WindowID, WindowData> &E : windows) {
						
						if (mouse_mode == MOUSE_MODE_CAPTURED) {
							
							XUndefineCursor(x11_display, E.value.x11_window);
						}
					}
					XUngrabPointer(x11_display, CurrentTime);
				}
#ifdef TOUCH_ENABLED
				
				/*for (int i = 0; i < xi.touch_devices.size(); ++i) {
					XIUngrabDevice(x11_display, xi.touch_devices[i], CurrentTime);
				}*/
				
				for (const KeyValue<int, Vector2> &E : xi.state) {
					Ref<InputEventScreenTouch> st;
					st.instantiate();
					st->set_index(E.key);
					st->set_window_id(window_id);
					st->set_position(E.value);
					Input::get_singleton()->parse_input_event(st);