### 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)
return (p_handle == HANDLE_FROM ? texture->get_fill_from() : texture->get_fill_to()).clamp(Vector2(), Vector2(1, 1)) * size;
}
GradientTexture2DEdit::Handle GradientTexture2DEdit::get_handle_at(const Vector2 &p_pos) {
	Point2 from_pos = _get_handle_pos(HANDLE_FROM);
	Point2 to_pos = _get_handle_pos(HANDLE_TO);
	
	if (p_pos.distance_squared_to(from_pos) < p_pos.distance_squared_to(to_pos)) {
		return Rect2(from_pos.round() - handle_size / 2, handle_size).has_point(p_pos) ? HANDLE_FROM : HANDLE_NONE;
	} else {
		return Rect2(to_pos.round() - handle_size / 2, handle_size).has_point(p_pos) ? HANDLE_TO : HANDLE_NONE;
	}
}
void GradientTexture2DEdit::set_fill_pos(const Vector2 &p_pos) {
	if (p_pos.is_equal_approx(initial_grab_pos)) {
		return;
	}
	const StringName property_name = (grabbed == HANDLE_FROM) ? "fill_from" : "fill_to";
	EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
	undo_redo->create_action(TTR("Move GradientTexture2D Fill Point"));
	undo_redo->add_do_property(texture.ptr(), property_name, p_pos);
	undo_redo->add_undo_property(texture.ptr(), property_name, initial_grab_pos);
	undo_redo->commit_action();
}
void GradientTexture2DEdit::gui_input(const Ref<InputEvent> &p_event) {