### 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
}
	GDScriptCodeGenerator *gen = codegen.generator;
	switch (p_expression->type) {
		case GDScriptParser::Node::IDENTIFIER: {
			
			const GDScriptParser::IdentifierNode *in = static_cast<const GDScriptParser::IdentifierNode *>(p_expression);
			StringName identifier = in->name;
			
			if (codegen.parameters.has(identifier)) {
				return codegen.parameters[identifier];
			}
			
			if (!p_initializer && codegen.locals.has(identifier)) {
				return codegen.locals[identifier];
			}
			
			if (_is_class_member_property(codegen, identifier)) {
				
				GDScriptCodeGenerator::Address temp = codegen.add_temporary(); 
				gen->write_get_member(temp, identifier);
				return temp;
			}
			
			if (!codegen.function_node || !codegen.function_node->is_static) {
				
				if (codegen.script->member_indices.has(identifier)) {
					if (codegen.script->member_indices[identifier].getter != StringName() && codegen.script->member_indices[identifier].getter != codegen.function_name) {
						
						GDScriptCodeGenerator::Address temp = codegen.add_temporary();
						Vector<GDScriptCodeGenerator::Address> args;