### 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 (has_expected_type && expected_type.is_hard_type() && expected_type.kind == GDScriptParser::DataType::BUILTIN && expected_type.builtin_type == Variant::NIL) {
			push_error("A void function cannot return a value.", p_return);
		}
		result = p_return->return_value->get_datatype();
	} else {
		
		result.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT;
		result.kind = GDScriptParser::DataType::BUILTIN;
		result.builtin_type = Variant::NIL;
		result.is_constant = true;
	}
	if (has_expected_type) {
		expected_type.is_meta_type = false;
		if (expected_type.is_hard_type()) {
			if (!is_type_compatible(expected_type, result)) {
				
				if (!is_type_compatible(result, expected_type)) {
					push_error(vformat(R"(Cannot return value of type "%s" because the function return type is "%s".)", result.to_string(), expected_type.to_string()), p_return);
				} else {
					
					mark_node_unsafe(p_return);
				}
#ifdef DEBUG_ENABLED
			} else if (expected_type.builtin_type == Variant::INT && result.builtin_type == Variant::FLOAT) {
				parser->push_warning(p_return, GDScriptWarning::NARROWING_CONVERSION);
			} else if (result.is_variant()) {
				mark_node_unsafe(p_return);
#endif
			}
		}