### 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 (script_class->members_indices.has(first)) {
				resolve_class_member(script_class, first, p_type);
				GDScriptParser::ClassNode::Member member = script_class->get_member(first);
				switch (member.type) {
					case GDScriptParser::ClassNode::Member::CLASS:
						result = member.get_datatype();
						break;
					case GDScriptParser::ClassNode::Member::ENUM:
						result = member.get_datatype();
						break;
					case GDScriptParser::ClassNode::Member::CONSTANT:
						if (member.get_datatype().is_meta_type) {
							result = member.get_datatype();
							result.is_meta_type = false;
							break;
						} else if (Ref<Script>(member.constant->initializer->reduced_value).is_valid()) {
							Ref<GDScript> gdscript = member.constant->initializer->reduced_value;
							if (gdscript.is_valid()) {
								Ref<GDScriptParserRef> ref = get_parser_for(gdscript->get_script_path());
								if (ref->raise_status(GDScriptParserRef::INHERITANCE_SOLVED) != OK) {
									push_error(vformat(R"(Could not parse script from "%s".)", gdscript->get_script_path()), p_type);
									return bad_type;
								}
								result = ref->get_parser()->head->get_datatype();
								result.is_meta_type = false;
							} else {
								Ref<Script> script = member.constant->initializer->reduced_value;
								result.kind = GDScriptParser::DataType::SCRIPT;
								result.builtin_type = Variant::OBJECT;