### Godot version

4.1.beta1

### System information

macOS 13.3.1 mobile renderer

### Issue description

Trying to open and edit one of my visual shaders now consistently crashes Godot 4.1beta1. 

The shader was made and edited fine in earlier versions of Godot 4 and I'm not certain what is special with this shader (attached below for investigation). Opening and editing other visual shaders works fine for me. The only thing I can think of that this shader uses that other do not is the gradient node, though as I can't open it I'm not sure what else might be going on in it.

### Steps to reproduce

Open the attached visual shader (in any project)

### Minimal reproduction project

[ConnectBlendShader.tres.zip](https://www.lostminds.com/godot/ConnectBlendShader.tres.zip)
empty_space->set_custom_minimum_size(Vector2(0, spacing));
	add_child(empty_space);
	set_mouse_filter(MOUSE_FILTER_STOP);
	_set_snap_enabled(snap_button->is_pressed());
	_set_snap_count(snap_count_edit->get_value());
}
/
bool EditorInspectorPluginCurve::can_handle(Object *p_object) {
	return Object::cast_to<Curve>(p_object) != nullptr;
}
void EditorInspectorPluginCurve::parse_begin(Object *p_object) {
	Curve *curve = Object::cast_to<Curve>(p_object);
	ERR_FAIL_COND(!curve);
	Ref<Curve> c(curve);
	CurveEditor *editor = memnew(CurveEditor);
	editor->set_curve(c);
	add_custom_control(editor);
}
CurveEditorPlugin::CurveEditorPlugin() {
	Ref<EditorInspectorPluginCurve> plugin;
	plugin.instantiate();
	add_inspector_plugin(plugin);
	EditorInterface::get_singleton()->get_resource_previewer()->add_preview_generator(memnew(CurvePreviewGenerator));
}
/
bool CurvePreviewGenerator::handles(const String &p_type) const {
	return p_type == "Curve";
}
Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, const Size2 &p_size, Dictionary &p_metadata) const {
	Ref<Curve> curve = p_from;