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

CollisionObject2D *a = Object::cast_to<CollisionObject2D>(p_a.collider);
							CollisionObject2D *b = Object::cast_to<CollisionObject2D>(p_b.collider);
							if (!a || !b) {
								return false;
							}
							int za = a->get_effective_z_index();
							int zb = b->get_effective_z_index();
							if (za != zb) {
								return zb < za;
							}
							return a->is_greater_than(b);
						}
					};
					SortArray<PhysicsDirectSpaceState2D::ShapeResult, ComparatorCollisionObjects> sorter;
					sorter.sort(res, rc);
				}
				for (int i = 0; i < rc; i++) {
					if (res[i].collider_id.is_valid() && res[i].collider) {
						CollisionObject2D *co = Object::cast_to<CollisionObject2D>(res[i].collider);
						if (co && co->can_process()) {
							bool send_event = true;
							if (is_mouse) {
								HashMap<ObjectID, uint64_t>::Iterator F = physics_2d_mouseover.find(res[i].collider_id);
								if (!F) {
									physics_2d_mouseover.insert(res[i].collider_id, frame);
									co->_mouse_enter();
								} else {