### Godot version

4.1.0

### System information

Windows 10, i711800H, Forward+ Vulkan

### Issue description

When using @export_group("Name") in a BaseClass, then inheriting from that BaseClass in another class and there also using @export_group("Name"), with the same group name, then running the project and re-saving the inherited class the project crashes with 
```
ERROR: FATAL: Index p_index = 3 is out of bounds (size() = 3).
   at: get (./core/templates/cowdata.h:155)
```

sometimes the editor crashes too after a while.

### Steps to reproduce

1. open reproduction project
2. Run the project.
3. Open the "super"script
4. Press CTRL + S to save it.

### Minimal reproduction project

[MRP_.zip](https://github.com/godotengine/godot/files/12137412/MRP_.zip)

push_warning(p_source, p_code, Vector<String>{ p_symbols... });
	}
#endif
	void make_completion_context(CompletionType p_type, Node *p_node, int p_argument = -1, bool p_force = false);
	void make_completion_context(CompletionType p_type, Variant::Type p_builtin_type, bool p_force = false);
	void push_completion_call(Node *p_call);
	void pop_completion_call();
	void set_last_completion_call_arg(int p_argument);
	GDScriptTokenizer::Token advance();
	bool match(GDScriptTokenizer::Token::Type p_token_type);
	bool check(GDScriptTokenizer::Token::Type p_token_type) const;
	bool consume(GDScriptTokenizer::Token::Type p_token_type, const String &p_error_message);
	bool is_at_end() const;
	bool is_statement_end_token() const;
	bool is_statement_end() const;
	void end_statement(const String &p_context);
	void synchronize();
	void push_multiline(bool p_state);
	void pop_multiline();
	
	void parse_program();
	ClassNode *parse_class(bool p_is_static);
	void parse_class_name();
	void parse_extends();
	void parse_class_body(bool p_is_multiline);
	template <class T>
	void parse_class_member(T *(GDScriptParser::*p_parse_function)(bool), AnnotationInfo::TargetKind p_target, const String &p_member_kind, bool p_is_static = false);
	SignalNode *parse_signal(bool p_is_static);
	EnumNode *parse_enum(bool p_is_static);