### 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
#ifdef DEBUG_ENABLED
	List<Ref<GDScript>> scripts;
	{
		MutexLock lock(this->mutex);
		SelfList<GDScript> *elem = script_list.first();
		while (elem) {
			
			if (elem->self()->is_root_script() && elem->self()->get_path().is_resource_file()) {
				scripts.push_back(Ref<GDScript>(elem->self())); 
			}
			elem = elem->next();
		}
	}
	
	HashMap<Ref<GDScript>, HashMap<ObjectID, List<Pair<StringName, Variant>>>> to_reload;
	
	scripts.sort_custom<GDScriptDepSort>(); 
	for (Ref<GDScript> &scr : scripts) {
		bool reload = scr == p_script || to_reload.has(scr->get_base());
		if (!reload) {
			continue;
		}
		to_reload.insert(scr, HashMap<ObjectID, List<Pair<StringName, Variant>>>());
		if (!p_soft_reload) {