### Godot version

4.0b17

### System information

macOS 13.2

### Issue description

If you make a visual spatial shader and that uses an instance uniform and you have some nodes with previews (the little graphic view) for example like this:

![Screenshot 2023-02-02 at 18 54 15](https://user-images.githubusercontent.com/17763524/216403612-05591145-e32a-4b4b-a57f-9ebd47be4082.jpg)

You will get a strange error in the output whenever you load the shader like this:
```
--Main Shader--
    1 | shader_type canvas_item;
    2 | 
E   3-> instance uniform float InstanceParameter : hint_range(0, 1) = 1;
    4 | 
    5 | 
    6 | 
    7 | void fragment() {
    8 | 
    9 |  float n_out21p0 = InstanceParameter;
   10 | 
   11 | 
   12 | 
   13 |  float n_out14p0 = 1.0 - n_out21p0;
   14 | 
   15 | 
   16 |  COLOR.rgb = vec3(n_out14p0);
   17 | }
   18 | 
  :3 - Uniform instances are not yet implemented for 'canvas_item' shaders.
  Shader compilation failed.
  ./servers/rendering/renderer_rd/shader_rd.h:140 - Condition "!version" is true. Returning: RID()
```

After a lot of experimenting the reason for this seems to be that the visual shader editor is actually also generating canvas_item shaders to render the little node previews (an elegant solution!). And for this shader code it's using the uniforms the nodes are connected to. However, this doesn't seem to account for the fact that we now have instance uniforms that are supported in spatial visual shaders, but not in canvas_item shaders. So it's failing to compile the shaders for the previews and outputs this error in the process. The failures have probably been happening since instance uniforms were added, but the error reporting has been added more recently so I started seeing these in one of the later beta versions.

This doesn't seem to affect the generated shader performance, but it's outputting some confusing errors (took me a good while to figure out) and the previews for the nodes just show all white so you could say it affects the usability of the shader editor.

### Steps to reproduce

- Create a spatial visual shader
- Add an input parameter and set the qualifier to be "Instance"
- Link the parameter value to some node with a preview
- Link that node to the output
- Observe output for errors
- Open/close the file in the editor or open/close the preview on the node to see errors again.

### Minimal reproduction project

The shader from the example: [VisualShaderInstanceUniform.zip](https://www.lostminds.com/godot/VisualShaderInstanceUniform.zip)
for (int i = 0; i < TYPE_MAX; i++) {
		if (!has_func_name(RenderingServer::ShaderMode(shader_mode), func_name[i])) {
			continue;
		}
		String func_code = global_code_per_func[Type(i)].as_string();
		if (empty_funcs.has(Type(i)) && !func_code.is_empty()) {
			func_code = vformat("%s%s%s", String("\nvoid " + String(func_name[i]) + "() {\n"), func_code, "}\n");
		}
		tcode = tcode.insert(insertion_pos[i], func_code);
	}
	final_code += tcode;
	const_cast<VisualShader *>(this)->set_code(final_code);
	for (int i = 0; i < default_tex_params.size(); i++) {
		for (int j = 0; j < default_tex_params[i].params.size(); j++) {
			const_cast<VisualShader *>(this)->set_default_texture_parameter(default_tex_params[i].name, default_tex_params[i].params[j], j);
		}
	}
	if (previous_code != final_code) {
		const_cast<VisualShader *>(this)->emit_signal(SNAME("changed"));
	}
	previous_code = final_code;
}
void VisualShader::_queue_update() {
	if (dirty.is_set()) {
		return;
	}
	dirty.set();
	call_deferred(SNAME("_update_shader"));
}
void VisualShader::rebuild() {