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

} else {
			RS::get_singleton()->viewport_set_size(viewport, 0, 0);
		}
#ifndef _3D_DISABLED
	} 
#endif
	_update_global_transform();
	update_configuration_warnings();
	update_canvas_items();
	for (ViewportTexture *E : viewport_textures) {
		E->emit_changed();
	}
	emit_signal(SNAME("size_changed"));
}
Size2i Viewport::_get_size() const {
#ifndef _3D_DISABLED
	if (use_xr) {
		if (XRServer::get_singleton() != nullptr) {
			Ref<XRInterface> xr_interface = XRServer::get_singleton()->get_primary_interface();
			if (xr_interface.is_valid() && xr_interface->is_initialized()) {
				Size2 xr_size = xr_interface->get_render_target_size();
				return (Size2i)xr_size;
			}
		}
		return Size2i();
	}
#endif 
	return size;
}
Size2i Viewport::_get_size_2d_override() const {