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

RenderingServer::get_singleton()->viewport_set_parent_viewport(viewport, RID());
		} break;
		case NOTIFICATION_INTERNAL_PHYSICS_PROCESS: {
			if (!get_tree()) {
				return;
			}
			if (get_tree()->is_debugging_collisions_hint() && contact_2d_debug.is_valid()) {
				RenderingServer::get_singleton()->canvas_item_clear(contact_2d_debug);
				RenderingServer::get_singleton()->canvas_item_set_draw_index(contact_2d_debug, 0xFFFFF); 
				Vector<Vector2> points = PhysicsServer2D::get_singleton()->space_get_contacts(find_world_2d()->get_space());
				int point_count = PhysicsServer2D::get_singleton()->space_get_contact_count(find_world_2d()->get_space());
				Color ccol = get_tree()->get_debug_collision_contact_color();
				for (int i = 0; i < point_count; i++) {
					RenderingServer::get_singleton()->canvas_item_add_rect(contact_2d_debug, Rect2(points[i] - Vector2(2, 2), Vector2(5, 5)), ccol);
				}
			}
#ifndef _3D_DISABLED
			if (get_tree()->is_debugging_collisions_hint() && contact_3d_debug_multimesh.is_valid()) {
				Vector<Vector3> points = PhysicsServer3D::get_singleton()->space_get_contacts(find_world_3d()->get_space());
				int point_count = PhysicsServer3D::get_singleton()->space_get_contact_count(find_world_3d()->get_space());
				RS::get_singleton()->multimesh_set_visible_instances(contact_3d_debug_multimesh, point_count);
				for (int i = 0; i < point_count; i++) {
					Transform3D point_transform;
					point_transform.origin = points[i];
					RS::get_singleton()->multimesh_instance_set_transform(contact_3d_debug_multimesh, i, point_transform);
				}
			}
#endif 
		} break;
		case NOTIFICATION_VP_MOUSE_ENTER: {