### 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
StringName assign_class_member_property;
				GDScriptCodeGenerator::Address target_member_property;
				bool is_member_property = false;
				bool member_property_has_setter = false;
				bool member_property_is_in_setter = false;
				StringName member_property_setter_function;
				List<const GDScriptParser::SubscriptNode *> chain;
				{
					
					const GDScriptParser::SubscriptNode *n = subscript;
					while (true) {
						chain.push_back(n);
						if (n->base->type != GDScriptParser::Node::SUBSCRIPT) {
							
							if (n->base->type == GDScriptParser::Node::IDENTIFIER) {
								GDScriptParser::IdentifierNode *identifier = static_cast<GDScriptParser::IdentifierNode *>(n->base);
								StringName var_name = identifier->name;
								if (_is_class_member_property(codegen, var_name)) {
									assign_class_member_property = var_name;
								} else if (!_is_local_or_parameter(codegen, var_name) && codegen.script->member_indices.has(var_name)) {
									is_member_property = true;
									member_property_setter_function = codegen.script->member_indices[var_name].setter;
									member_property_has_setter = member_property_setter_function != StringName();
									member_property_is_in_setter = member_property_has_setter && member_property_setter_function == codegen.function_name;
									target_member_property.mode = GDScriptCodeGenerator::Address::MEMBER;
									target_member_property.address = codegen.script->member_indices[var_name].index;
									target_member_property.type = codegen.script->member_indices[var_name].data_type;
								}
							}