### 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 (curve.is_null() || selected_index < 0) {
		return TANGENT_NONE;
	}
	const Rect2 hover_rect = Rect2(p_pos, Vector2(0, 0)).grow(tangent_hover_radius);
	if (selected_index != 0) {
		Vector2 control_pos = get_tangent_view_pos(selected_index, TANGENT_LEFT);
		if (hover_rect.has_point(control_pos)) {
			return TANGENT_LEFT;
		}
	}
	if (selected_index != curve->get_point_count() - 1) {
		Vector2 control_pos = get_tangent_view_pos(selected_index, TANGENT_RIGHT);
		if (hover_rect.has_point(control_pos)) {
			return TANGENT_RIGHT;
		}
	}
	return TANGENT_NONE;
}
float CurveEdit::get_offset_without_collision(int p_current_index, float p_offset, bool p_prioritize_right) {