### Godot version

v4.0.beta.custom_build [1d14c054a]

### System information

Kubuntu 22.10

### Issue description

Regression in master (in beta 10 the following script works correctly).

### Steps to reproduce

```gdscript
@tool
extends EditorScript

func wait(time: float) -> void:
    await get_editor_interface().get_tree().create_timer(time).timeout

func _run() -> void:
    reference()
    # Error: Cannot get return value of call to "wait()" because it returns "void".
    await wait(1.0)
    print("Test")
    unreference()
```

### Minimal reproduction project

N/A
err_line = -1;
	err_column = -1;
	error = "";
	parser = p_parser;
	main_script = p_script;
	const GDScriptParser::ClassNode *root = parser->get_tree();
	source = p_script->get_path();
	
	make_scripts(p_script, root, p_keep_state);
	main_script->_owner = nullptr;
	Error err = _populate_class_members(main_script, parser->get_tree(), p_keep_state);
	if (err) {
		return err;
	}
	err = _compile_class(main_script, root, p_keep_state);
	if (err) {
		return err;
	}
#ifdef TOOLS_ENABLED
	p_script->_update_doc();
#endif
	return GDScriptCache::finish_compiling(main_script->get_path());
}
String GDScriptCompiler::get_error() const {