### Godot version

0ddd9c3e8f9088fa139e25b2903289d727073e12

### System information

arch linux, google pixel 6

### Issue description

I've found that Android builds of projects are crashing when a touch release event occurs. This issue is only present when the `emulate_mouse_from_touch` setting is set to `false` in the project's settings, and a control node is present in the scene.

Expected result:

The touch release event should be registered without any crashes.

Actual result:

The android build crashes when a touch release event occurs.

### Steps to reproduce

- Create a new project
- Set `emulate_mouse_from_touch` setting to `false`
- Add a button to the main scene
- Build the project for android
- Run the project on android device
- Touch and release on the screen

### Minimal reproduction project

[android-touch-release-crash.zip](https://github.com/godotengine/godot/files/10432336/android-touch-release-crash.zip)

Rect2 swrect = Rect2i(sw->get_position(), sw->get_size());
					if (!sw->get_flag(Window::FLAG_BORDERLESS)) {
						int title_height = sw->get_theme_constant(SNAME("title_height"));
						swrect.position.y -= title_height;
						swrect.size.y += title_height;
					}
					if (swrect.has_point(viewport_pos)) {
						viewport_under = sw;
						viewport_pos -= sw->get_position();
					}
				}
				if (!viewport_under) {
					
					viewport_under = embedder;
				}
			} else {
				
				Vector2i screen_mouse_pos = DisplayServer::get_singleton()->mouse_get_position();
				DisplayServer::WindowID window_id = DisplayServer::get_singleton()->get_window_at_screen_position(screen_mouse_pos);
				if (window_id != DisplayServer::INVALID_WINDOW_ID) {
					ObjectID object_under = DisplayServer::get_singleton()->window_get_attached_instance_id(window_id);
					if (object_under != ObjectID()) { 
						Window *w = Object::cast_to<Window>(ObjectDB::get_instance(object_under));
						if (w) {
							viewport_under = w;
							viewport_pos = screen_mouse_pos - w->get_position();
						}
					}
				}
			}