### 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_for->list->datatype.has_container_element_type()) {
			variable_type = p_for->list->datatype.get_container_element_type();
			variable_type.type_source = GDScriptParser::DataType::ANNOTATED_INFERRED;
		} else if (p_for->list->datatype.is_typed_container_type()) {
			variable_type = p_for->list->datatype.get_typed_container_type();
			variable_type.type_source = GDScriptParser::DataType::ANNOTATED_INFERRED;
		} else {
			
			
			variable_type.type_source = GDScriptParser::DataType::UNDETECTED;
			variable_type.kind = GDScriptParser::DataType::VARIANT;
		}
	}
	if (p_for->variable) {
		p_for->variable->set_datatype(variable_type);
	}
	resolve_suite(p_for->loop);
	p_for->set_datatype(p_for->loop->get_datatype());
#ifdef DEBUG_ENABLED
	if (p_for->variable) {
		is_shadowing(p_for->variable, R"("for" iterator variable)");
	}
#endif
}
void GDScriptAnalyzer::resolve_while(GDScriptParser::WhileNode *p_while) {
	resolve_node(p_while->condition, false);
	resolve_suite(p_while->loop);
	p_while->set_datatype(p_while->loop->get_datatype());
}
void GDScriptAnalyzer::resolve_assert(GDScriptParser::AssertNode *p_assert) {