### 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
}
	if (implicit_ready) {
		for (const Variant &V : implicit_ready->constants) {
			GDScript *scr = _get_gdscript_from_variant(V);
			if (scr != nullptr && scr != p_except) {
				scr->_get_dependencies(p_dependencies, p_except);
			}
		}
	}
	for (KeyValue<StringName, Ref<GDScript>> &E : subclasses) {
		if (E.value != p_except) {
			E.value->_get_dependencies(p_dependencies, p_except);
		}
	}
	for (const KeyValue<StringName, Variant> &E : constants) {
		GDScript *scr = _get_gdscript_from_variant(E.value);
		if (scr != nullptr && scr != p_except) {
			scr->_get_dependencies(p_dependencies, p_except);
		}
	}
}
GDScript::GDScript() :
		script_list(this) {
	{
		MutexLock lock(GDScriptLanguage::get_singleton()->mutex);
		GDScriptLanguage::get_singleton()->script_list.add(&script_list);
	}
	path = vformat("gdscript://%d.gd", get_instance_id());
}
void GDScript::_save_orphaned_subclasses(GDScript::ClearData *p_clear_data) {