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

int layer_count = grid->layer_count;
	layers->clear();
	for (int i = 0; i < layer_count; i++) {
		const String name = get_layer_name(i);
		if (name.is_empty()) {
			continue;
		}
		layers->add_check_item(name, i);
		int idx = layers->get_item_index(i);
		layers->set_item_checked(idx, grid->value & (1 << i));
	}
	if (layers->get_item_count() == 0) {
		layers->add_item(TTR("No Named Layers"));
		layers->set_item_disabled(0, true);
	}
	layers->add_separator();
	layers->add_icon_item(get_theme_icon("Edit", "EditorIcons"), TTR("Edit Layer Names"), grid->layer_count);
	Rect2 gp = button->get_screen_rect();
	layers->reset_size();
	Vector2 popup_pos = gp.position - Vector2(layers->get_contents_minimum_size().x, 0);
	layers->set_position(popup_pos);
	layers->popup();
}
void EditorPropertyLayers::_menu_pressed(int p_menu) {