### 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
if (destructing) {
		return;
	}
	destructing = true;
	clear();
	{
		MutexLock lock(GDScriptLanguage::get_singleton()->mutex);
		while (SelfList<GDScriptFunctionState> *E = pending_func_states.first()) {
			
			
			pending_func_states.remove(E);
			GDScriptFunctionState *state = E->self();
			ObjectID state_id = state->get_instance_id();
			state->_clear_connections();
			if (ObjectDB::get_instance(state_id)) {
				state->_clear_stack();
			}
		}
	}
	{
		MutexLock lock(GDScriptLanguage::get_singleton()->mutex);
		GDScriptLanguage::get_singleton()->script_list.remove(&script_list);
	}
}
bool GDScriptInstance::set(const StringName &p_name, const Variant &p_value) {