### Godot version

Godot 4.0.1.stable

### System information

Windows 10, Forward+

### Issue description

Example code:

```gdscript
@warning_ignore("shadowed_global_identifier")
static func print_debug(msg: String):
```

the warning is ignored by pressing [ignore] in the warnings panel.

pressing it multiple times results in:
```gdscript
@warning_ignore("shadowed_global_identifier", "shadowed_global_identifier")
```


### Steps to reproduce

Shadowing a global function with a method of script:

```gdscript
@warning_ignore("shadowed_global_identifier")
static func print_debug(msg: String):
```


### Minimal reproduction project

```gdscript
@warning_ignore("shadowed_global_identifier")
static func print_debug(msg: String):
    pass
```
EnumNode *enum_node = alloc_node<EnumNode>();
	bool named = false;
	if (check(GDScriptTokenizer::Token::IDENTIFIER)) {
		advance();
		enum_node->identifier = parse_identifier();
		named = true;
	}
	push_multiline(true);
	consume(GDScriptTokenizer::Token::BRACE_OPEN, vformat(R"(Expected "{" after %s.)", named ? "enum name" : R"("enum")"));
	HashMap<StringName, int> elements;
#ifdef DEBUG_ENABLED
	List<MethodInfo> gdscript_funcs;
	GDScriptLanguage::get_singleton()->get_public_functions(&gdscript_funcs);
#endif
	do {
		if (check(GDScriptTokenizer::Token::BRACE_CLOSE)) {
			break; 
		}
		if (consume(GDScriptTokenizer::Token::IDENTIFIER, R"(Expected identifier for enum key.)")) {
			EnumNode::Value item;
			GDScriptParser::IdentifierNode *identifier = parse_identifier();
#ifdef DEBUG_ENABLED
			if (!named) { 
				for (MethodInfo &info : gdscript_funcs) {