### 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
const GDScript *sl = sptr;
			while (sl) {
				HashMap<StringName, Vector<StringName>>::ConstIterator E = sl->_signals.find(p_name);
				if (E) {
					r_ret = Signal(this->owner, E->key);
					return true; 
				}
				sl = sl->_base;
			}
		}
		{
			
			const GDScript *sl = sptr;
			while (sl) {
				HashMap<StringName, GDScriptFunction *>::ConstIterator E = sl->member_functions.find(p_name);
				if (E) {
					if (sptr->rpc_config.has(p_name)) {
						r_ret = Callable(memnew(GDScriptRPCCallable(this->owner, E->key)));
					} else {
						r_ret = Callable(this->owner, E->key);
					}
					return true; 
				}
				sl = sl->_base;
			}
		}
		{
			HashMap<StringName, GDScriptFunction *>::ConstIterator E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._get);
			if (E) {
				Variant name = p_name;