### 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
return "gd";
}
void GDScriptLanguage::finish() {
	if (_call_stack) {
		memdelete_arr(_call_stack);
		_call_stack = nullptr;
	}
	
	GDScriptCache::clear();
	
	
	SelfList<GDScript> *s = script_list.first();
	while (s) {
		
		
		
		
		
		Ref<GDScript> scr = s->self();
		if (scr.is_valid()) {
			for (KeyValue<StringName, GDScriptFunction *> &E : scr->member_functions) {
				GDScriptFunction *func = E.value;
				for (int i = 0; i < func->argument_types.size(); i++) {
					func->argument_types.write[i].script_type_ref = Ref<Script>();
				}
				func->return_type.script_type_ref = Ref<Script>();
			}
			for (KeyValue<StringName, GDScript::MemberInfo> &E : scr->member_indices) {
				E.value.data_type.script_type_ref = Ref<Script>();