### Godot version

4.0dev (4fa6edc88)

### System information

Ubuntu 20.04.2 LTS

### Issue description

Panning of the 2D view does not work after attempting to rename node

### Steps to reproduce

1. Open the a scene in the 2D viewing tab
2. Double click to rename any node under the scene tab
3. click into the 2D view directly
4. attempt to pan the view through middle-clicking or using the pan tool

Refocusing the editor window will fix it temporarily

### Minimal reproduction project

[Panning Issue.zip](https://github.com/godotengine/godot/files/10529131/Panning.Issue.zip)

static const char *target_type = "text/uri-list";
	if (p_t1 != None && get_atom_name(p_disp, p_t1) == target_type) {
		return p_t1;
	}
	if (p_t2 != None && get_atom_name(p_disp, p_t2) == target_type) {
		return p_t2;
	}
	if (p_t3 != None && get_atom_name(p_disp, p_t3) == target_type) {
		return p_t3;
	}
	return None;
}
void DisplayServerX11::_get_key_modifier_state(unsigned int p_x11_state, Ref<InputEventWithModifiers> state) {
	state->set_shift_pressed((p_x11_state & ShiftMask));
	state->set_ctrl_pressed((p_x11_state & ControlMask));
	state->set_alt_pressed((p_x11_state & Mod1Mask )); 
	state->set_meta_pressed((p_x11_state & Mod4Mask));
}
BitField<MouseButtonMask> DisplayServerX11::_get_mouse_button_state(MouseButton p_x11_button, int p_x11_type) {
	MouseButtonMask mask = mouse_button_to_mask(p_x11_button);
	if (p_x11_type == ButtonPress) {
		last_button_state.set_flag(mask);
	} else {
		last_button_state.clear_flag(mask);
	}
	return last_button_state;
}
void DisplayServerX11::_handle_key_event(WindowID p_window, XKeyEvent *p_event, LocalVector<XEvent> &p_events, uint32_t &p_event_index, bool p_echo) {