### 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 (mm->is_alt_pressed()) {
						float prev_point_offset = (selected_index > 0) ? (curve->get_point_position(selected_index - 1).x + 0.00001) : 0.0;
						float next_point_offset = (selected_index < curve->get_point_count() - 1) ? (curve->get_point_position(selected_index + 1).x - 0.00001) : 1.0;
						new_pos.x = CLAMP(new_pos.x, prev_point_offset, next_point_offset);
					}
					new_pos.x = get_offset_without_collision(selected_index, new_pos.x, mpos.x >= get_view_pos(new_pos).x);
					
					int i = curve->set_point_offset(selected_index, new_pos.x);
					hovered_index = i;
					set_selected_index(i);
					new_pos.y = CLAMP(new_pos.y, curve->get_min_value(), curve->get_max_value());
					curve->set_point_value(selected_index, new_pos.y);
				} else {
					
					const Vector2 new_pos = curve->get_point_position(selected_index);
					const Vector2 control_pos = get_world_pos(mpos);
					Vector2 dir = (control_pos - new_pos).normalized();
					real_t tangent = dir.y / (dir.x > 0 ? MAX(dir.x, 0.00001) : MIN(dir.x, -0.00001));
					
					hovered_tangent_index = selected_tangent_index;
					
					if (selected_tangent_index == TANGENT_LEFT) {
						curve->set_point_left_tangent(selected_index, tangent);
						
						
						if (selected_index != (curve->get_point_count() - 1) && curve->get_point_right_mode(selected_index) != Curve::TANGENT_LINEAR) {
							curve->set_point_right_tangent(selected_index, mm->is_shift_pressed() ? initial_grab_right_tangent : tangent);
						}