### 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
append_opcode(GDScriptFunction::OPCODE_ASSIGN_TRUE);
	append(p_target);
}
void GDScriptByteCodeGenerator::write_assign_false(const Address &p_target) {
	append_opcode(GDScriptFunction::OPCODE_ASSIGN_FALSE);
	append(p_target);
}
void GDScriptByteCodeGenerator::write_assign_default_parameter(const Address &p_dst, const Address &p_src) {
	write_assign(p_dst, p_src);
	function->default_arguments.push_back(opcodes.size());
}
void GDScriptByteCodeGenerator::write_store_global(const Address &p_dst, int p_global_index) {
	append_opcode(GDScriptFunction::OPCODE_STORE_GLOBAL);
	append(p_dst);
	append(p_global_index);
}
void GDScriptByteCodeGenerator::write_store_named_global(const Address &p_dst, const StringName &p_global) {
	append_opcode(GDScriptFunction::OPCODE_STORE_NAMED_GLOBAL);
	append(p_dst);
	append(p_global);
}
void GDScriptByteCodeGenerator::write_cast(const Address &p_target, const Address &p_source, const GDScriptDataType &p_type) {