### 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)

print_verbose(vformat("XInput %d.%d not available (server supports %d.%d). Touch input unavailable.",
				XINPUT_CLIENT_VERSION_MAJOR, XINPUT_CLIENT_VERSION_MINOR, xi_major_query, xi_minor_query));
	}
	xi.absolute_devices.clear();
	xi.touch_devices.clear();
	xi.pen_inverted_devices.clear();
	int dev_count;
	XIDeviceInfo *info = XIQueryDevice(x11_display, XIAllDevices, &dev_count);
	for (int i = 0; i < dev_count; i++) {
		XIDeviceInfo *dev = &info[i];
		if (!dev->enabled) {
			continue;
		}
		if (!(dev->use == XISlavePointer || dev->use == XIFloatingSlave)) {
			continue;
		}
		bool direct_touch = false;
		bool absolute_mode = false;
		int resolution_x = 0;
		int resolution_y = 0;
		double abs_x_min = 0;
		double abs_x_max = 0;
		double abs_y_min = 0;
		double abs_y_max = 0;
		double pressure_min = 0;
		double pressure_max = 0;
		double tilt_x_min = 0;
		double tilt_x_max = 0;
		double tilt_y_min = 0;
		double tilt_y_max = 0;