### 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
```
if (p_subscript->base == nullptr) {
		return;
	}
	if (p_subscript->base->type == GDScriptParser::Node::IDENTIFIER) {
		reduce_identifier(static_cast<GDScriptParser::IdentifierNode *>(p_subscript->base), true);
	} else if (p_subscript->base->type == GDScriptParser::Node::SUBSCRIPT) {
		reduce_subscript(static_cast<GDScriptParser::SubscriptNode *>(p_subscript->base), true);
	} else {
		reduce_expression(p_subscript->base);
	}
	GDScriptParser::DataType result_type;
	if (p_subscript->is_attribute) {
		if (p_subscript->attribute == nullptr) {
			return;
		}
		GDScriptParser::DataType base_type = p_subscript->base->get_datatype();
		bool valid = false;
		
		if (p_subscript->base->is_constant && !base_type.is_meta_type) {
			
			Variant value = p_subscript->base->reduced_value.get_named(p_subscript->attribute->name, valid);