### 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
bool all_is_constant = true;
	for (int i = 0; i < p_dictionary->elements.size(); i++) {
		const GDScriptParser::DictionaryNode::Pair &element = p_dictionary->elements[i];
		if (element.value->type == GDScriptParser::Node::ARRAY) {
			const_fold_array(static_cast<GDScriptParser::ArrayNode *>(element.value));
		} else if (element.value->type == GDScriptParser::Node::DICTIONARY) {
			const_fold_dictionary(static_cast<GDScriptParser::DictionaryNode *>(element.value));
		}
		all_is_constant = all_is_constant && element.key->is_constant && element.value->is_constant;
		if (!all_is_constant) {
			return;
		}
	}
	Dictionary dict;
	for (int i = 0; i < p_dictionary->elements.size(); i++) {
		const GDScriptParser::DictionaryNode::Pair &element = p_dictionary->elements[i];
		dict[element.key->reduced_value] = element.value->reduced_value;
	}
	p_dictionary->is_constant = true;
	p_dictionary->reduced_value = dict;
}
GDScriptParser::DataType GDScriptAnalyzer::type_from_variant(const Variant &p_value, const GDScriptParser::Node *p_source) {
	GDScriptParser::DataType result;
	result.is_constant = true;
	result.kind = GDScriptParser::DataType::BUILTIN;
	result.builtin_type = p_value.get_type();
	result.type_source = GDScriptParser::DataType::ANNOTATED_EXPLICIT; 
	if (p_value.get_type() == Variant::OBJECT) {