### 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)
} else if (grabbing == GRAB_NONE) {
				
				Vector2 new_pos = get_world_pos(mpos).clamp(Vector2(0.0, curve->get_min_value()), Vector2(1.0, curve->get_max_value()));
				if (snap_enabled || mb->is_ctrl_pressed()) {
					new_pos.x = Math::snapped(new_pos.x, 1.0 / snap_count);
					new_pos.y = Math::snapped(new_pos.y - curve->get_min_value(), curve->get_range() / snap_count) + curve->get_min_value();
				}
				new_pos.x = get_offset_without_collision(selected_index, new_pos.x, mpos.x >= get_view_pos(new_pos).x);
				
				int new_idx = curve->add_point_no_update(new_pos);
				set_selected_index(new_idx);
				grabbing = GRAB_ADD;
				initial_grab_pos = new_pos;
			}
		}
	}
	if (mb.is_valid() && mb->get_button_index() == MouseButton::LEFT && !mb->is_pressed()) {
		if (selected_tangent_index != TANGENT_NONE) {
			
			if (selected_index == 0) {
				set_point_right_tangent(selected_index, curve->get_point_right_tangent(selected_index));
			} else if (selected_index == curve->get_point_count() - 1) {
				set_point_left_tangent(selected_index, curve->get_point_left_tangent(selected_index));
			} else {
				set_point_tangents(selected_index, curve->get_point_left_tangent(selected_index), curve->get_point_right_tangent(selected_index));
			}
			grabbing = GRAB_NONE;
		} else if (grabbing == GRAB_MOVE) {
			
			set_point_position(selected_index, curve->get_point_position(selected_index));