### 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)

GDScriptParser::DataType type = make_enum_type(p_enum_name, p_native_class, p_meta);
	List<StringName> enum_values;
	ClassDB::get_enum_constants(p_native_class, p_enum_name, &enum_values);
	for (const StringName &E : enum_values) {
		type.enum_values[E] = ClassDB::get_integer_constant(p_native_class, E);
	}
	return type;
}
static GDScriptParser::DataType make_builtin_meta_type(Variant::Type p_type) {
	GDScriptParser::DataType type;
	type.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT;
	type.kind = GDScriptParser::DataType::BUILTIN;
	type.builtin_type = p_type;
	type.is_constant = true;
	type.is_meta_type = true;
	return type;
}
static StringName enum_get_value_name(const GDScriptParser::DataType p_type, int64_t p_val) {