### 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
Object *obj = ObjectDB::get_instance(subclass.id);
		if (!obj) {
			continue;
		}
		
		GDScriptLanguage::get_singleton()->add_orphan_subclass(subclass.fully_qualified_name, subclass.id);
	}
}
void GDScript::_init_rpc_methods_properties() {
	
	rpc_config.clear();
	if (base.is_valid()) {
		rpc_config = base->rpc_config.duplicate();
	}
	
	for (KeyValue<StringName, GDScriptFunction *> &E : member_functions) {
		Variant config = E.value->get_rpc_config();
		if (config.get_type() != Variant::NIL) {
			rpc_config[E.value->get_name()] = config;
		}
	}
}
void GDScript::clear(GDScript::ClearData *p_clear_data) {
	if (clearing) {
		return;
	}
	clearing = true;
	GDScript::ClearData data;
	GDScript::ClearData *clear_data = p_clear_data;
	bool is_root = false;