### 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
}
	if (!p_type->get_datatype().has_no_type()) {
		return p_type->get_datatype();
	}
	GDScriptParser::DataType resolving_datatype;
	resolving_datatype.kind = GDScriptParser::DataType::RESOLVING;
	p_type->set_datatype(resolving_datatype);
	GDScriptParser::DataType result;
	result.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT;
	result.builtin_type = Variant::OBJECT;
	if (p_type->type_chain.is_empty()) {
		
		result.kind = GDScriptParser::DataType::BUILTIN;
		result.builtin_type = Variant::NIL;
		p_type->set_datatype(result);
		return result;
	}
	StringName first = p_type->type_chain[0]->name;
	if (first == SNAME("Variant")) {
		if (p_type->type_chain.size() > 1) {
			
			push_error(R"(Variant doesn't contain nested types.)", p_type->type_chain[1]);
			return bad_type;
		}
		result.kind = GDScriptParser::DataType::VARIANT;
	} else if (first == SNAME("Object")) {
		
		result.kind = GDScriptParser::DataType::NATIVE;
		result.native_type = SNAME("Object");
	} else if (GDScriptParser::get_builtin_type(first) < Variant::VARIANT_MAX) {