### Godot version

v4.0.beta.custom_build [bb08997b8]

### System information

Ubuntu 22.10 LTS, GTX1060, Vulkan

### Issue description

If you toggle emulate_touch_from_mouse option in ProjectSettings `InputEventMouseMotion`, `InputEventScreenDrag`, `InputEventScreenTouch` passes through `Panel`, afaik this doesn't happen in **`3.x branch`**

how tree looks:
```
- Node
  - Panel(half screen size, to stop input events)
  - Node(captures unhandled inputs)

```
screen separated into 2 sides, left side is Panel, right is empty space, so if you click on Panel you can't get any output from _unhandled_input on Node.

### Steps to reproduce

1. run attachment
2. click and/or scroll with mouse on left side and right side (check output)
3. go to project settings and toggle `emulate touch from mouse`
4. go to step 2 (check output)

### Minimal reproduction project

[New Game Project.zip](https://github.com/godotengine/godot/files/10371324/New.Game.Project.zip)

int index = _sub_window_find(p_window);
	ERR_FAIL_COND(index == -1);
	const SubWindow &sw = gui.sub_windows[index];
	Transform2D pos;
	pos.set_origin(p_window->get_position());
	RS::get_singleton()->canvas_item_clear(sw.canvas_item);
	Rect2i r = Rect2i(p_window->get_position(), sw.window->get_size());
	if (!p_window->get_flag(Window::FLAG_BORDERLESS)) {
		Ref<StyleBox> panel = p_window->get_theme_stylebox(SNAME("embedded_border"));
		panel->draw(sw.canvas_item, r);
		
		Ref<Font> title_font = p_window->get_theme_font(SNAME("title_font"));
		int font_size = p_window->get_theme_font_size(SNAME("title_font_size"));
		Color title_color = p_window->get_theme_color(SNAME("title_color"));
		int title_height = p_window->get_theme_constant(SNAME("title_height"));
		int close_h_ofs = p_window->get_theme_constant(SNAME("close_h_offset"));
		int close_v_ofs = p_window->get_theme_constant(SNAME("close_v_offset"));
		TextLine title_text = TextLine(p_window->atr(p_window->get_title()), title_font, font_size);
		title_text.set_width(r.size.width - panel->get_minimum_size().x - close_h_ofs);
		title_text.set_direction(p_window->is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR);
		int x = (r.size.width - title_text.get_size().x) / 2;
		int y = (-title_height - title_text.get_size().y) / 2;
		Color font_outline_color = p_window->get_theme_color(SNAME("title_outline_modulate"));
		int outline_size = p_window->get_theme_constant(SNAME("title_outline_size"));
		if (outline_size > 0 && font_outline_color.a > 0) {
			title_text.draw_outline(sw.canvas_item, r.position + Point2(x, y), outline_size, font_outline_color);
		}