### 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 Variant *args[1] = { &name };
				Callable::CallError err;
				Variant ret = const_cast<GDScriptFunction *>(E->value)->call(const_cast<GDScriptInstance *>(this), (const Variant **)args, 1, err);
				if (err.error == Callable::CallError::CALL_OK && ret.get_type() != Variant::NIL) {
					r_ret = ret;
					return true;
				}
			}
		}
		sptr = sptr->_base;
	}
	return false;
}
Variant::Type GDScriptInstance::get_property_type(const StringName &p_name, bool *r_is_valid) const {
	const GDScript *sptr = script.ptr();
	while (sptr) {
		if (sptr->member_info.has(p_name)) {
			if (r_is_valid) {
				*r_is_valid = true;
			}
			return sptr->member_info[p_name].type;
		}
		sptr = sptr->_base;
	}
	if (r_is_valid) {
		*r_is_valid = false;
	}
	return Variant::NIL;
}
void GDScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const {