### Godot version

4.1.dev

### System information

Win11

### Issue description

I load a non-existing GDScript, but it still returns a valid instance instead of null.
```gdscript
@tool
extends EditorScript

func _run():
	var s = ResourceLoader.load("non_exists.gd", "", ResourceLoader.CACHE_MODE_IGNORE)
	print(s)
	assert(s == null)

```

```
  Attempt to open script 'res://non_exists.gd' resulted in error 'File not found'.
<GDScript#-9223369015982753437>
  res://new_script.gd:7 - Assertion failed.

```

### Steps to reproduce

N/A

### Minimal reproduction project

N/A
RBSet<GDScript *> dependencies = get_dependencies();
	RBSet<GDScript *> must_clear_dependencies;
	HashMap<GDScript *, RBSet<GDScript *>> inverted_dependencies;
	for (GDScript *E : dependencies) {
		inverted_dependencies.insert(E, E->get_inverted_dependencies());
	}
	RBSet<GDScript *> cant_clear;
	for (KeyValue<GDScript *, RBSet<GDScript *>> &E : inverted_dependencies) {
		for (GDScript *F : E.value) {
			if (!dependencies.has(F)) {
				cant_clear.insert(E.key);
				for (GDScript *G : E.key->get_dependencies()) {
					cant_clear.insert(G);
				}
				break;
			}
		}
	}
	for (KeyValue<GDScript *, RBSet<GDScript *>> &E : inverted_dependencies) {
		if (cant_clear.has(E.key) || ScriptServer::is_global_class(E.key->get_fully_qualified_name())) {
			continue;
		}
		must_clear_dependencies.insert(E.key);
	}
	cant_clear.clear();
	dependencies.clear();
	inverted_dependencies.clear();
	return must_clear_dependencies;
}
bool GDScript::has_script_signal(const StringName &p_signal) const {