### 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
```
result.kind = GDScriptParser::DataType::NATIVE;
		Object *obj = p_value;
		if (!obj) {
			return GDScriptParser::DataType();
		}
		result.native_type = obj->get_class_name();
		Ref<Script> scr = p_value; 
		if (scr.is_valid()) {
			result.is_meta_type = true;
		} else {
			result.is_meta_type = false;
			scr = obj->get_script();
		}
		if (scr.is_valid()) {
			Ref<GDScript> gds = scr;
			if (gds.is_valid()) {
				
				
				String script_path = gds->get_script_path();
				Ref<GDScriptParserRef> ref = get_parser_for(script_path);
				if (ref.is_null()) {
					push_error(vformat(R"(Could not find script "%s".)", script_path), p_source);
					GDScriptParser::DataType error_type;
					error_type.kind = GDScriptParser::DataType::VARIANT;
					return error_type;
				}
				Error err = ref->raise_status(GDScriptParserRef::INHERITANCE_SOLVED);
				GDScriptParser::ClassNode *found = nullptr;
				if (err == OK) {
					found = ref->get_parser()->find_class(gds->fully_qualified_name);