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

GDVIRTUAL0RC(bool, _has_filter)
public:
	virtual void get_parameter_list(List<PropertyInfo> *r_list) const;
	virtual Variant get_parameter_default_value(const StringName &p_parameter) const;
	virtual bool is_parameter_read_only(const StringName &p_parameter) const;
	void set_parameter(const StringName &p_name, const Variant &p_value);
	Variant get_parameter(const StringName &p_name) const;
	struct ChildNode {
		StringName name;
		Ref<AnimationNode> node;
	};
	virtual void get_child_nodes(List<ChildNode> *r_child_nodes);
	virtual double process(double p_time, bool p_seek, bool p_is_external_seeking);
	virtual String get_caption() const;
	virtual bool add_input(const String &p_name);
	virtual void remove_input(int p_index);
	virtual bool set_input_name(int p_input, const String &p_name);
	virtual String get_input_name(int p_input) const;
	int get_input_count() const;
	int find_input(const String &p_name) const;
	void set_filter_path(const NodePath &p_path, bool p_enable);
	bool is_path_filtered(const NodePath &p_path) const;
	void set_filter_enabled(bool p_enable);
	bool is_filter_enabled() const;
	virtual bool has_filter() const;
	virtual Ref<AnimationNode> get_child_by_name(const StringName &p_name);
	AnimationNode();
};
VARIANT_ENUM_CAST(AnimationNode::FilterAction)
class AnimationRootNode : public AnimationNode {