### 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(dependencies, this);
	dependencies.erase(this);
	return dependencies;
}
RBSet<GDScript *> GDScript::get_inverted_dependencies() {
	RBSet<GDScript *> inverted_dependencies;
	List<GDScript *> scripts;
	{
		MutexLock lock(GDScriptLanguage::singleton->mutex);
		SelfList<GDScript> *elem = GDScriptLanguage::singleton->script_list.first();
		while (elem) {
			scripts.push_back(elem->self());
			elem = elem->next();
		}
	}
	for (GDScript *scr : scripts) {
		if (scr == nullptr || scr == this || scr->destructing) {
			continue;
		}
		RBSet<GDScript *> scr_dependencies = scr->get_dependencies();
		if (scr_dependencies.has(this)) {
			inverted_dependencies.insert(scr);
		}
	}
	return inverted_dependencies;
}
RBSet<GDScript *> GDScript::get_must_clear_dependencies() {