### Godot version

4.0.1(flatpak)

### System information

Linux openSUSE

### Issue description

Cyclic Dependencies in shader result in infinite loop

### Steps to reproduce

Create 'main' shader that includes other shader, let's say `inc_me1` and `inc_me2` if 'inc_me1' that includes 'main' shader and 'inc_me2' includes 'inc_me1'. It results in a freeze.

### Minimal reproduction project

[Shader dependency.zip](https://github.com/godotengine/godot/files/11547654/Shader.dependency.zip)
uncomment include, and the editor will freeze and crash
_recompile();
}
void Shader::_recompile() {
	set_code(get_code());
}
void Shader::set_path(const String &p_path, bool p_take_over) {
	Resource::set_path(p_path, p_take_over);
	RS::get_singleton()->shader_set_path_hint(shader, p_path);
}
void Shader::set_include_path(const String &p_path) {
	
	
	include_path = p_path;
}
void Shader::set_code(const String &p_code) {
	for (Ref<ShaderInclude> E : include_dependencies) {
		E->disconnect(SNAME("changed"), callable_mp(this, &Shader::_dependency_changed));
	}
	String type = ShaderLanguage::get_shader_type(p_code);
	if (type == "canvas_item") {
		mode = MODE_CANVAS_ITEM;
	} else if (type == "particles") {
		mode = MODE_PARTICLES;
	} else if (type == "sky") {
		mode = MODE_SKY;
	} else if (type == "fog") {
		mode = MODE_FOG;