### Godot version

v4.1.rc2.official [46424488e]

### System information

Godot v4.1.rc2 - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3623) - AMD Ryzen 7 5700G with Radeon Graphics (16 Threads)

### Issue description

When setting the AnimationTree to active, Godot crashes.

### Steps to reproduce

https://github.com/godotengine/godot/assets/46705245/dbe5eb81-1357-43e8-ac80-a4eb97eea9fc

### Minimal reproduction project

[Crash.zip](https://github.com/godotengine/godot/files/11945826/Crash.zip)

path.clear();
}
void AnimationNodeStateMachinePlayback::push_path(const StringName &p_state) {
	path.push_back(p_state);
}
void AnimationNodeStateMachinePlayback::_set_base_path(const String &p_base_path) {
	base_path = p_base_path;
}
Ref<AnimationNodeStateMachinePlayback> AnimationNodeStateMachinePlayback::_get_parent_playback(AnimationTree *p_tree) const {
	if (base_path.is_empty()) {
		return Ref<AnimationNodeStateMachinePlayback>();
	}
	Vector<String> split = base_path.split("/");
	ERR_FAIL_COND_V_MSG(split.size() < 2, Ref<AnimationNodeStateMachinePlayback>(), "Path is too short.");
	StringName self_path = split[split.size() - 2];
	split.remove_at(split.size() - 2);
	String playback_path = String("/").join(split) + "playback";
	Ref<AnimationNodeStateMachinePlayback> playback = p_tree->get(playback_path);
	if (!playback.is_valid()) {
		ERR_PRINT_ONCE("Can't get parent AnimationNodeStateMachinePlayback with path: " + playback_path + ". Maybe there is no Root/Nested AnimationNodeStateMachine in the parent of the Grouped AnimationNodeStateMachine.");
		return Ref<AnimationNodeStateMachinePlayback>();
	}
	if (playback->get_current_node() != self_path) {
		return Ref<AnimationNodeStateMachinePlayback>();
	}
	return playback;
}
Ref<AnimationNodeStateMachine> AnimationNodeStateMachinePlayback::_get_parent_state_machine(AnimationTree *p_tree) const {