### 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)
draw_set_transform_matrix(Transform2D());
	bool shift_pressed = Input::get_singleton()->is_key_pressed(Key::SHIFT);
	const Color point_color = get_theme_color(SNAME("font_color"), SNAME("Editor"));
	for (int i = 0; i < curve->get_point_count(); ++i) {
		Vector2 pos = get_view_pos(curve->get_point_position(i));
		if (selected_index != i) {
			draw_rect(Rect2(pos, Vector2(0, 0)).grow(point_radius), point_color);
		}
		if (hovered_index == i && hovered_tangent_index == TANGENT_NONE) {
			draw_rect(Rect2(pos, Vector2(0, 0)).grow(hover_radius - Math::round(3 * EDSCALE)), line_color, false, Math::round(1 * EDSCALE));
		}
	}
	
	if (selected_index >= 0) {
		const Vector2 point_pos = curve->get_point_position(selected_index);
		const Color selected_point_color = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
		
		if (grabbing == GRAB_NONE || initial_grab_pos == point_pos || selected_tangent_index != TANGENT_NONE) {
			const Color selected_tangent_color = get_theme_color(SNAME("accent_color"), SNAME("Editor")).darkened(0.25);
			const Color tangent_color = get_theme_color(SNAME("font_color"), SNAME("Editor")).darkened(0.25);
			if (selected_index != 0) {
				Vector2 control_pos = get_tangent_view_pos(selected_index, TANGENT_LEFT);
				Color left_tangent_color = (selected_tangent_index == TANGENT_LEFT) ? selected_tangent_color : tangent_color;
				draw_line(get_view_pos(point_pos), control_pos, left_tangent_color, 0.5 * EDSCALE, true);
				
				if (curve->get_point_left_mode(selected_index) == Curve::TANGENT_FREE) {
					draw_circle(control_pos, tangent_radius, left_tangent_color);
				} else {
					draw_rect(Rect2(control_pos, Vector2(0, 0)).grow(tangent_radius), left_tangent_color);