### 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
for (const int &E : match_continues_to_patch.back()->get()) {
		patch_jump(E);
	}
	match_continues_to_patch.pop_back();
}
void GDScriptByteCodeGenerator::write_break() {
	append_opcode(GDScriptFunction::OPCODE_JUMP);
	current_breaks_to_patch.back()->get().push_back(opcodes.size());
	append(0);
}
void GDScriptByteCodeGenerator::write_continue() {
	append_opcode(GDScriptFunction::OPCODE_JUMP);
	append(continue_addrs.back()->get());
}
void GDScriptByteCodeGenerator::write_continue_match() {
	append_opcode(GDScriptFunction::OPCODE_JUMP);
	match_continues_to_patch.back()->get().push_back(opcodes.size());
	append(0);
}
void GDScriptByteCodeGenerator::write_breakpoint() {
	append_opcode(GDScriptFunction::OPCODE_BREAKPOINT);
}
void GDScriptByteCodeGenerator::write_newline(int p_line) {
	append_opcode(GDScriptFunction::OPCODE_LINE);
	append(p_line);
	current_line = p_line;
}
void GDScriptByteCodeGenerator::write_return(const Address &p_return_value) {