### 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)
if (p_index != selected_index) {
		selected_index = p_index;
		queue_redraw();
	}
}
void CurveEdit::update_view_transform() {
	Ref<Font> font = get_theme_font(SNAME("font"), SNAME("Label"));
	int font_size = get_theme_font_size(SNAME("font_size"), SNAME("Label"));
	const real_t margin = font->get_height(font_size) + 2 * EDSCALE;
	float min_y = curve.is_valid() ? curve->get_min_value() : 0.0;
	float max_y = curve.is_valid() ? curve->get_max_value() : 1.0;
	const Rect2 world_rect = Rect2(Curve::MIN_X, min_y, Curve::MAX_X, max_y - min_y);
	const Size2 view_margin(margin, margin);
	const Size2 view_size = get_size() - view_margin * 2;
	const Vector2 scale = view_size / world_rect.size;
	Transform2D world_trans;
	world_trans.translate_local(-world_rect.position - Vector2(0, world_rect.size.y));
	world_trans.scale(Vector2(scale.x, -scale.y));
	Transform2D view_trans;
	view_trans.translate_local(view_margin);
	_world_to_view = view_trans * world_trans;
}
Vector2 CurveEdit::get_tangent_view_pos(int p_index, TangentIndex p_tangent) const {