### 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
emit_changed();
}
void ShaderInclude::set_code(const String &p_code) {
	HashSet<Ref<ShaderInclude>> new_dependencies;
	code = p_code;
	for (Ref<ShaderInclude> E : dependencies) {
		E->disconnect(SNAME("changed"), callable_mp(this, &ShaderInclude::_dependency_changed));
	}
	{
		String path = get_path();
		if (path.is_empty()) {
			path = include_path;
		}
		String pp_code;
		ShaderPreprocessor preprocessor;
		preprocessor.preprocess(p_code, path, pp_code, nullptr, nullptr, nullptr, &new_dependencies);
	}
	
	dependencies = new_dependencies;
	for (Ref<ShaderInclude> E : dependencies) {
		E->connect(SNAME("changed"), callable_mp(this, &ShaderInclude::_dependency_changed));
	}
	emit_changed();
}
String ShaderInclude::get_code() const {
	return code;
}
void ShaderInclude::set_include_path(const String &p_path) {