### 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
gen->write_assign(value, value_expr);
				if (value_expr.mode == GDScriptCodeGenerator::Address::TEMPORARY) {
					codegen.generator->pop_temporary();
				}
				
				GDScriptDataType typeof_type;
				typeof_type.has_type = true;
				typeof_type.kind = GDScriptDataType::BUILTIN;
				typeof_type.builtin_type = Variant::INT;
				GDScriptCodeGenerator::Address type = codegen.add_local("@match_type", typeof_type);
				Vector<GDScriptCodeGenerator::Address> typeof_args;
				typeof_args.push_back(value);
				gen->write_call_utility(type, "typeof", typeof_args);
				
				
				for (int j = 0; j < match->branches.size(); j++) {
					if (j > 0) {
						
						gen->write_else();
					}
					const GDScriptParser::MatchBranchNode *branch = match->branches[j];
					gen->start_match_branch(); 
					codegen.start_block(); 
					
					_add_locals_in_block(codegen, branch->block);
#ifdef DEBUG_ENABLED
					
					gen->write_newline(branch->start_line);
#endif