### 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 (texture.is_null()) {
		return;
	}
	const Ref<Texture2D> fill_from_icon = get_theme_icon(SNAME("EditorPathSmoothHandle"), SNAME("EditorIcons"));
	const Ref<Texture2D> fill_to_icon = get_theme_icon(SNAME("EditorPathSharpHandle"), SNAME("EditorIcons"));
	handle_size = fill_from_icon->get_size();
	Size2 rect_size = get_size();
	
	
	Size2 available_size = rect_size - handle_size;
	Size2 ratio = available_size / texture->get_size();
	size = MIN(ratio.x, ratio.y) * texture->get_size();
	offset = ((rect_size - size) / 2).round();
	checkerboard->set_rect(Rect2(offset, size));
	draw_set_transform(offset);
	draw_texture_rect(texture, Rect2(Point2(), size));
	
	if (snap_enabled || (Input::get_singleton()->is_key_pressed(Key::CTRL) && grabbed != HANDLE_NONE)) {
		const Color line_color = Color(0.5, 0.5, 0.5, 0.5);
		for (int idx = 0; idx < snap_count + 1; idx++) {
			float x = float(idx * size.width) / snap_count;
			float y = float(idx * size.height) / snap_count;