### Godot version

v4.0.beta10.official [d0398f62f]

### System information

Windows 11, Vulkan, Intel Iris Xe Graphics

### Issue description

The use of ParameterRef nodes in Visual Shader Graphs can lead to various crashes. Here are a few cases I was able to identify. Since they're all very much related, I figured it would be best to group them in this one report.

### Steps to reproduce

It's not necessary to use the included test file, because this can be done in any empty project, but I attached one just in case.
Double-click shader.tres to open the empty shader graph, then follow the instructions in one of the following bullet points. Each one of them leads to a crash:

- First, add a ParameterRef node to your shader graph. Then add a Parameter node of any type.
- Add a Parameter node of any type. Add one ParameterRef node. Delete the Parameter node. Ctrl+Z to undo the last step.
- Add a Parameter node of any type. Add at least two ParameterRef nodes. Delete the Parameter node.
- Add a Parameter node of any type. Add a ParameterRef node. Enter a new name for the Parameter node that is wider (in terms of pixels) than the previous one, and press Enter. (In some rare cases, the last step needs to be repeated once. Probably has to do with whether or not the user saved the shader inbetween the steps.)
- Add a Parameter node of any type. Add a ParameterRef node. Enter a new name for the Parameter node that is shorter (in terms of pixels) than the previous one and press "Enter". Then change the name again in the same way.

### Minimal reproduction project

[ShaderCrash.zip](https://github.com/godotengine/godot/files/10299297/ShaderCrash.zip)

void disconnect_nodes(VisualShader::Type p_type, int p_from_node, int p_from_port, int p_to_node, int p_to_port);
	void show_port_preview(VisualShader::Type p_type, int p_node_id, int p_port_id);
	void set_node_position(VisualShader::Type p_type, int p_id, const Vector2 &p_position);
	void refresh_node_ports(VisualShader::Type p_type, int p_node);
	void set_input_port_default_value(VisualShader::Type p_type, int p_node_id, int p_port_id, Variant p_value);
	void update_parameter_refs();
	void set_parameter_name(VisualShader::Type p_type, int p_node_id, const String &p_name);
	void update_curve(int p_node_id);
	void update_curve_xyz(int p_node_id);
	void set_expression(VisualShader::Type p_type, int p_node_id, const String &p_expression);
	int get_constant_index(float p_constant) const;
	Ref<Script> get_node_script(int p_node_id) const;
	void update_node_size(int p_node_id);
	void update_theme();
	VisualShader::Type get_shader_type() const;
	VisualShaderGraphPlugin();
	~VisualShaderGraphPlugin();
};
class VisualShaderEditedProperty : public RefCounted {
	GDCLASS(VisualShaderEditedProperty, RefCounted);
private:
	Variant edited_property;
protected:
	static void _bind_methods();
public:
	void set_edited_property(Variant p_variant);
	Variant get_edited_property() const;
	VisualShaderEditedProperty() {}
};
class VisualShaderEditor : public VBoxContainer {