### Godot version

v4.0.beta.custom_build [cc7aa72f0], v3.5.1.stable.official [6fed1ffa3]

### System information

Windows 10

### Issue description

`AnimationTree.rename_parameter` doesn't work when called from gdscript. It should rename AnimationTree's nodes. I have confirmed from the source how to call this and what parameters the editor uses when renaming nodes from the editor. For some reason, even when using the same parameters in gdscript, nothing happens.

I'm not sure if is this regression (if it is, it's quite old) or has it ever been tested to work. Seems a bit obscure method to be exposed anyway, unless somebody wants to make a custom editor plugin for AnimationTree. I ran into the issue trying to add class reference description for it.

### Steps to reproduce

* Add AnimationTree with any parameter named `CurrentName`
* Call following code:
```
rename_parameter("parameters/CurrentName", "parameters/NewName")
```


### Minimal reproduction project

[Rename Parameter bug.zip](https://github.com/godotengine/godot/files/10513522/Rename.Parameter.bug.zip)

filter.clear();
	for (int i = 0; i < p_filters.size(); i++) {
		set_filter_path(p_filters[i], true);
	}
}
void AnimationNode::_validate_property(PropertyInfo &p_property) const {
	if (!has_filter() && (p_property.name == "filter_enabled" || p_property.name == "filters")) {
		p_property.usage = PROPERTY_USAGE_NONE;
	}
}
Ref<AnimationNode> AnimationNode::get_child_by_name(const StringName &p_name) {
	Ref<AnimationNode> ret;
	GDVIRTUAL_CALL(_get_child_by_name, p_name, ret);
	return ret;
}
void AnimationNode::_bind_methods() {
	ClassDB::bind_method(D_METHOD("add_input", "name"), &AnimationNode::add_input);
	ClassDB::bind_method(D_METHOD("remove_input", "index"), &AnimationNode::remove_input);
	ClassDB::bind_method(D_METHOD("set_input_name", "input", "name"), &AnimationNode::set_input_name);
	ClassDB::bind_method(D_METHOD("get_input_name", "input"), &AnimationNode::get_input_name);
	ClassDB::bind_method(D_METHOD("get_input_count"), &AnimationNode::get_input_count);
	ClassDB::bind_method(D_METHOD("find_input", "name"), &AnimationNode::find_input);
	ClassDB::bind_method(D_METHOD("set_filter_path", "path", "enable"), &AnimationNode::set_filter_path);