### 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
break;
		case GDScriptParser::DataType::CLASS:
			if (p_source.is_meta_type) {
				src_native = GDScript::get_class_static();
			} else {
				src_class = p_source.class_type;
				const GDScriptParser::ClassNode *base = src_class;
				while (base->base_type.kind == GDScriptParser::DataType::CLASS) {
					base = base->base_type.class_type;
				}
				src_native = base->base_type.native_type;
				src_script = base->base_type.script_type;
			}
			break;
		case GDScriptParser::DataType::VARIANT:
		case GDScriptParser::DataType::BUILTIN:
		case GDScriptParser::DataType::ENUM:
		case GDScriptParser::DataType::RESOLVING:
		case GDScriptParser::DataType::UNRESOLVED:
			break; 
	}
	switch (p_target.kind) {
		case GDScriptParser::DataType::NATIVE: {
			if (p_target.is_meta_type) {
				return ClassDB::is_parent_class(src_native, GDScriptNativeClass::get_class_static());
			}
			return ClassDB::is_parent_class(src_native, p_target.native_type);
		}
		case GDScriptParser::DataType::SCRIPT:
			if (p_target.is_meta_type) {