### Godot version

Godot 4-beta10

### System information

Linux, KDE Neon, OpenGL3, Mesa Intel(R) UHD Graphics (CML GT2)

### Issue description

I can't move to Animation player when I open a AnimatedSprite

See the video:
https://youtu.be/_nyN42rNlTw


### Steps to reproduce

- Open Scene GPlayer
- Select Idle (Animation player) node
- Select Body (Animation sprite) node
- Select animation in bottom tab

### Minimal reproduction project

You can test in my game is open source and don't have many files 👍🏻 

[the-zero-day.zip](https://github.com/godotengine/godot/files/10304677/the-zero-day.zip)

if (read_only) {
		return;
	}
	const Ref<InputEventMouseMotion> mm = p_ev;
	if (mm.is_valid()) {
		bool expand_was_hovered = expand_hovered;
		expand_hovered = expand_rect.has_point(mm->get_position());
		if (expand_hovered != expand_was_hovered) {
			queue_redraw();
		}
		if (!expand_hovered) {
			for (int i = 0; i < flag_rects.size(); i++) {
				if (flag_rects[i].has_point(mm->get_position())) {
					
					hovered_index = i;
					queue_redraw();
					return;
				}
			}
		}
		
		if (hovered_index != -1) {
			hovered_index = -1;
			queue_redraw();
		}