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

uint64_t last_pass = 0;
	};
	Vector<real_t> blends;
	State *state = nullptr;
	double _pre_process(const StringName &p_base_path, AnimationNode *p_parent, State *p_state, double p_time, bool p_seek, bool p_is_external_seeking, const Vector<StringName> &p_connections);
	
	StringName base_path;
	Vector<StringName> connections;
	AnimationNode *parent = nullptr;
	HashMap<NodePath, bool> filter;
	bool filter_enabled = false;
	Array _get_filters() const;
	void _set_filters(const Array &p_filters);
	friend class AnimationNodeBlendTree;
	double _blend_node(const StringName &p_subpath, const Vector<StringName> &p_connections, AnimationNode *p_new_parent, Ref<AnimationNode> p_node, double p_time, bool p_seek, bool p_is_external_seeking, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_sync = true, real_t *r_max = nullptr);
protected:
	void blend_animation(const StringName &p_animation, double p_time, double p_delta, bool p_seeked, bool p_is_external_seeking, real_t p_blend, Animation::LoopedFlag p_looped_flag = Animation::LOOPED_FLAG_NONE);
	double blend_node(const StringName &p_sub_path, Ref<AnimationNode> p_node, double p_time, bool p_seek, bool p_is_external_seeking, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_sync = true);
	double blend_input(int p_input, double p_time, bool p_seek, bool p_is_external_seeking, real_t p_blend, FilterAction p_filter = FILTER_IGNORE, bool p_sync = true);
	void make_invalid(const String &p_reason);
	AnimationTree *get_animation_tree() const;
	static void _bind_methods();
	void _validate_property(PropertyInfo &p_property) const;
	GDVIRTUAL0RC(Dictionary, _get_child_nodes)
	GDVIRTUAL0RC(Array, _get_parameter_list)
	GDVIRTUAL1RC(Ref<AnimationNode>, _get_child_by_name, StringName)
	GDVIRTUAL1RC(Variant, _get_parameter_default_value, StringName)
	GDVIRTUAL1RC(bool, _is_parameter_read_only, StringName)
	GDVIRTUAL3RC(double, _process, double, bool, bool)
	GDVIRTUAL0RC(String, _get_caption)