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

// Erase itself from viewport textures.
	for (ViewportTexture *E : viewport_textures) {
		E->vp = nullptr;
	}
	ERR_FAIL_NULL(RenderingServer::get_singleton());
	RenderingServer::get_singleton()->free(viewport);
}
//
void SubViewport::set_size(const Size2i &p_size) {
	_internal_set_size(p_size);
}
void SubViewport::set_size_force(const Size2i &p_size) {
	// Use only for setting the size from the parent SubViewportContainer with enabled stretch mode.
	// Don't expose function to scripting.
	_internal_set_size(p_size, true);
}
void SubViewport::_internal_set_size(const Size2i &p_size, bool p_force) {
	SubViewportContainer *c = Object::cast_to<SubViewportContainer>(get_parent());
	if (!p_force && c && c->is_stretch_enabled()) {
#ifdef DEBUG_ENABLED
		WARN_PRINT("Can't change the size of a `SubViewport` with a `SubViewportContainer` parent that has `stretch` enabled. Set `SubViewportContainer.stretch` to `false` to allow changing the size manually.");
#endif // DEBUG_ENABLED
		return;
	}
	_set_size(p_size, _get_size_2d_override(), true);
	if (c) {
		c->update_minimum_size();
	}
}
Size2i SubViewport::get_size() const {