### 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
GDScript *sptr = script.ptr();
	if (unlikely(p_method == SNAME("_ready"))) {
		
		while (sptr) {
			if (sptr->implicit_ready) {
				sptr->implicit_ready->call(this, nullptr, 0, r_error);
			}
			sptr = sptr->_base;
		}
		
		sptr = script.ptr();
	}
	while (sptr) {
		HashMap<StringName, GDScriptFunction *>::Iterator E = sptr->member_functions.find(p_method);
		if (E) {
			return E->value->call(this, p_args, p_argcount, r_error);
		}
		sptr = sptr->_base;
	}
	r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
	return Variant();
}
void GDScriptInstance::notification(int p_notification) {