### 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
String iterative = p_string;
	int pass_count = 0;
	bool expanded = true;
	while (expanded) {
		expanded = false;
		
		for (const RBMap<String, Define *>::Element *E = state->defines.front(); E; E = E->next()) {
			if (expand_macros_once(iterative, p_line, E, iterative)) {
				expanded = true;
			}
		}
		pass_count++;
		if (pass_count > 50) {
			set_error(RTR("Macro expansion limit exceeded."), p_line);
			break;
		}
	}
	r_expanded = iterative;
	if (!state->error.is_empty()) {
		return FAILED;
	}
	return OK;
}
bool ShaderPreprocessor::expand_macros_once(const String &p_line, int p_line_number, const RBMap<String, Define *>::Element *p_define_pair, String &r_expanded) {