### Godot version

4.0 beta 10

### System information

Windows 10

### Issue description

Godot crashes when i accidently name 2 items in an enum the same

EDIT:
The editor freeze for some seconds, then both editor- and console-window dissapear

### Steps to reproduce

Write

```gdscript
enum {
    A,
}
```

and then add a second line with another A:

```gdscript
enum {
    A,
    A # <- crash
}
```

Does not always immediatly happen if i copy&paste items.
Does not happen when i change the script in another editor and open the script in Godot.

### Minimal reproduction project

[enum.zip](https://github.com/godotengine/godot/files/10313759/enum.zip)

resolve_function_body(member.variable->getter);
				}
				if (member.variable->setter != nullptr) {
					resolve_function_signature(member.variable->setter);
					if (member.variable->setter->parameters.size() > 0) {
						member.variable->setter->parameters[0]->datatype_specifier = member.variable->datatype_specifier;
						member.variable->setter->parameters[0]->set_datatype(member.get_datatype());
					}
					resolve_function_body(member.variable->setter);
				}
			}
		}
	}
	
	for (int i = 0; i < p_class->members.size(); i++) {
		GDScriptParser::ClassNode::Member member = p_class->members[i];
		if (member.type == GDScriptParser::ClassNode::Member::VARIABLE) {
#ifdef DEBUG_ENABLED
			HashSet<uint32_t> previously_ignored = parser->ignored_warning_codes;
			for (uint32_t ignored_warning : member.function->ignored_warnings) {
				parser->ignored_warning_codes.insert(ignored_warning);
			}
			if (member.variable->usages == 0 && String(member.variable->identifier->name).begins_with("_")) {
				parser->push_warning(member.variable->identifier, GDScriptWarning::UNUSED_PRIVATE_CLASS_VARIABLE, member.variable->identifier->name);
			}
#endif
			if (member.variable->property == GDScriptParser::VariableNode::PROP_SETGET) {
				GDScriptParser::FunctionNode *getter_function = nullptr;
				GDScriptParser::FunctionNode *setter_function = nullptr;
				bool has_valid_getter = false;