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

if (transition->get_advance_mode() != AnimationNodeStateMachineTransition::ADVANCE_MODE_AUTO) {
		return false;
	}
	StringName advance_condition_name = transition->get_advance_condition_name();
	if (advance_condition_name != StringName() && !bool(state_machine->get_parameter(advance_condition_name))) {
		return false;
	}
	if (transition->expression.is_valid()) {
		AnimationTree *tree_base = state_machine->get_animation_tree();
		ERR_FAIL_COND_V(tree_base == nullptr, false);
		NodePath advance_expression_base_node_path = tree_base->get_advance_expression_base_node();
		Node *expression_base = tree_base->get_node_or_null(advance_expression_base_node_path);
		if (expression_base) {
			Ref<Expression> exp = transition->expression;
			bool ret = exp->execute(Array(), expression_base, false, Engine::get_singleton()->is_editor_hint()); 
			if (exp->has_execute_failed() || !ret) {
				return false;
			}
		} else {
			WARN_PRINT_ONCE("Animation transition has a valid expression, but no expression base node was set on its AnimationTree.");
		}
	}
	return true;
}
void AnimationNodeStateMachinePlayback::clear_path() {