### 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_RETURN_TYPED_SCRIPT);
				append(p_return_value);
				append(script_idx);
			} break;
			default: {
				ERR_PRINT("Compiler bug: unresolved return.");
				
				append_opcode(GDScriptFunction::OPCODE_RETURN);
				append(p_return_value);
			} break;
		}
	}
}
void GDScriptByteCodeGenerator::write_assert(const Address &p_test, const Address &p_message) {
	append_opcode(GDScriptFunction::OPCODE_ASSERT);
	append(p_test);
	append(p_message);
}
void GDScriptByteCodeGenerator::start_block() {
	push_stack_identifiers();
}
void GDScriptByteCodeGenerator::end_block() {
	pop_stack_identifiers();
}
GDScriptByteCodeGenerator::~GDScriptByteCodeGenerator() {
	if (!ended && function != nullptr) {
		memdelete(function);
	}
}