### 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 (!subgroup.is_empty() && !subgroup_base.is_empty()) {
				if (path.begins_with(subgroup_base)) {
					path = path.trim_prefix(subgroup_base);
				} else if (subgroup_base.begins_with(path)) {
					
				} else {
					subgroup = ""; 
				}
			}
			
			if (!group.is_empty() && !group_base.is_empty() && subgroup.is_empty()) {
				if (path.begins_with(group_base)) {
					path = path.trim_prefix(group_base);
				} else if (group_base.begins_with(path)) {
					
				} else {
					group = ""; 
					subgroup = "";
				}
			}
			
			if (!subgroup.is_empty()) {
				path = subgroup + "/" + path;
			}
			if (!group.is_empty()) {
				path = group + "/" + path;
			}
		}
		
		String name_override = (path.contains("/")) ? path.substr(path.rfind("/") + 1) : path;