### 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
prop_info.hint = export_info.hint;
					prop_info.hint_string = export_info.hint_string;
					prop_info.usage = export_info.usage | PROPERTY_USAGE_SCRIPT_VARIABLE;
				} else {
					prop_info.usage = PROPERTY_USAGE_SCRIPT_VARIABLE;
				}
#ifdef TOOLS_ENABLED
				p_script->doc_variables[name] = variable->doc_description;
#endif
				p_script->member_info[name] = prop_info;
				p_script->member_indices[name] = minfo;
				p_script->members.insert(name);
#ifdef TOOLS_ENABLED
				if (variable->initializer != nullptr && variable->initializer->is_constant) {
					p_script->member_default_values[name] = variable->initializer->reduced_value;
					GDScriptCompiler::convert_to_initializer_type(p_script->member_default_values[name], variable);
				} else {
					p_script->member_default_values.erase(name);
				}
				p_script->member_lines[name] = variable->start_line;
#endif
			} break;
			case GDScriptParser::ClassNode::Member::CONSTANT: {
				const GDScriptParser::ConstantNode *constant = member.constant;
				StringName name = constant->identifier->name;
				p_script->constants.insert(name, constant->initializer->reduced_value);
#ifdef TOOLS_ENABLED
				p_script->member_lines[name] = constant->start_line;
				if (!constant->doc_description.is_empty()) {
					p_script->doc_constants[name] = constant->doc_description;