### 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)
switch (p_what) {
		case NOTIFICATION_MOUSE_EXIT: {
			if (hovered_index != -1 || hovered_tangent_index != TANGENT_NONE) {
				hovered_index = -1;
				hovered_tangent_index = TANGENT_NONE;
				queue_redraw();
			}
		} break;
		case NOTIFICATION_THEME_CHANGED:
		case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
			float gizmo_scale = EDITOR_GET("interface/touchscreen/scale_gizmo_handles");
			point_radius = Math::round(BASE_POINT_RADIUS * get_theme_default_base_scale() * gizmo_scale);
			hover_radius = Math::round(BASE_HOVER_RADIUS * get_theme_default_base_scale() * gizmo_scale);
			tangent_radius = Math::round(BASE_TANGENT_RADIUS * get_theme_default_base_scale() * gizmo_scale);
			tangent_hover_radius = Math::round(BASE_TANGENT_HOVER_RADIUS * get_theme_default_base_scale() * gizmo_scale);
			tangent_length = Math::round(BASE_TANGENT_LENGTH * get_theme_default_base_scale());
		} break;
		case NOTIFICATION_DRAW: {
			_redraw();
		} break;
		case NOTIFICATION_VISIBILITY_CHANGED: {
			if (!is_visible()) {
				grabbing = GRAB_NONE;
			}
		} break;
	}
}
void CurveEdit::gui_input(const Ref<InputEvent> &p_event) {