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

ERR_FAIL_COND(p_event.is_null());
	Ref<InputEventMouseButton> mb = p_event;
	if (mb.is_valid()) {
		if (!mb->is_pressed()) {
			gui.mouse_focus_mask.clear_flag(mouse_button_to_mask(mb->get_button_index())); 
		}
	}
}
List<Control *>::Element *Viewport::_gui_add_root_control(Control *p_control) {
	gui.roots_order_dirty = true;
	return gui.roots.push_back(p_control);
}
void Viewport::gui_set_root_order_dirty() {
	gui.roots_order_dirty = true;
}
void Viewport::_gui_force_drag(Control *p_base, const Variant &p_data, Control *p_control) {
	ERR_FAIL_COND_MSG(p_data.get_type() == Variant::NIL, "Drag data must be a value.");
	gui.dragging = true;
	gui.drag_data = p_data;
	gui.mouse_focus = nullptr;
	if (p_control) {
		_gui_set_drag_preview(p_base, p_control);
	}
	_propagate_viewport_notification(this, NOTIFICATION_DRAG_BEGIN);
}
void Viewport::_gui_set_drag_preview(Control *p_base, Control *p_control) {