### 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
```
complete_extents(n_for);
	
	can_break = could_break;
	can_continue = could_continue;
	return n_for;
}
GDScriptParser::IfNode *GDScriptParser::parse_if(const String &p_token) {
	IfNode *n_if = alloc_node<IfNode>();
	n_if->condition = parse_expression(false);
	if (n_if->condition == nullptr) {
		push_error(vformat(R"(Expected conditional expression after "%s".)", p_token));
	}
	consume(GDScriptTokenizer::Token::COLON, vformat(R"(Expected ":" after "%s" condition.)", p_token));
	n_if->true_block = parse_suite(vformat(R"("%s" block)", p_token));
	n_if->true_block->parent_if = n_if;
	if (n_if->true_block->has_continue) {
		current_suite->has_continue = true;
	}
	if (match(GDScriptTokenizer::Token::ELIF)) {
		SuiteNode *else_block = alloc_node<SuiteNode>();
		else_block->parent_function = current_function;
		else_block->parent_block = current_suite;
		SuiteNode *previous_suite = current_suite;
		current_suite = else_block;
		IfNode *elif = parse_if("elif");
		else_block->statements.push_back(elif);
		complete_extents(else_block);
		n_if->false_block = else_block;
		current_suite = previous_suite;
	} else if (match(GDScriptTokenizer::Token::ELSE)) {