### 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)
ci(p_ci),
			color1(p_color1),
			color2(p_color2) {}
	void operator()(Vector2 pos0, Vector2 pos1, bool in_definition) {
		ci.draw_line(pos0, pos1, in_definition ? color1 : color2, 0.5, true);
	}
};
void CurveEdit::_redraw() {
	if (curve.is_null()) {
		return;
	}
	update_view_transform();
	
	Vector2 view_size = get_rect().size;
	draw_style_box(get_theme_stylebox(SNAME("panel"), SNAME("Tree")), Rect2(Point2(), view_size));
	
	draw_set_transform_matrix(_world_to_view);
	Vector2 min_edge = get_world_pos(Vector2(0, view_size.y));
	Vector2 max_edge = get_world_pos(Vector2(view_size.x, 0));
	const Color grid_color_primary = get_theme_color(SNAME("mono_color"), SNAME("Editor")) * Color(1, 1, 1, 0.25);
	const Color grid_color = get_theme_color(SNAME("mono_color"), SNAME("Editor")) * Color(1, 1, 1, 0.1);
	const Vector2i grid_steps = Vector2i(4, 2);
	const Vector2 step_size = Vector2(1, curve->get_range()) / grid_steps;
	draw_line(Vector2(min_edge.x, curve->get_min_value()), Vector2(max_edge.x, curve->get_min_value()), grid_color_primary);
	draw_line(Vector2(max_edge.x, curve->get_max_value()), Vector2(min_edge.x, curve->get_max_value()), grid_color_primary);
	draw_line(Vector2(0, min_edge.y), Vector2(0, max_edge.y), grid_color_primary);
	draw_line(Vector2(1, max_edge.y), Vector2(1, min_edge.y), grid_color_primary);