### 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 _member_selected();
	void _member_unselected();
	void _member_create();
	void _member_cancel();
	void _varying_create();
	void _varying_name_changed(const String &p_text);
	void _varying_deleted();
	void _varying_selected();
	void _varying_unselected();
	void _update_varying_tree();
	Vector2 menu_point;
	void _node_menu_id_pressed(int p_idx);
	Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
	bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
	void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
	bool _is_available(int p_mode);
	void _update_created_node(GraphNode *node);
	void _update_parameters(bool p_update_refs);
	void _update_parameter_refs(HashSet<String> &p_names);
	void _update_varyings();
	void _update_options_menu_deferred();
	void _rebuild_shader_deferred();
	void _visibility_changed();
protected:
	void _notification(int p_what);
	static void _bind_methods();
public:
	void add_plugin(const Ref<VisualShaderNodePlugin> &p_plugin);
	void remove_plugin(const Ref<VisualShaderNodePlugin> &p_plugin);
	VisualShaderGraphPlugin *get_graph_plugin() { return graph_plugin.ptr(); }