### 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
if (p_params >= ptrcall_max) {
			ptrcall_max = p_params;
		}
	}
	int address_of(const Address &p_address) {
		switch (p_address.mode) {
			case Address::SELF:
				return GDScriptFunction::ADDR_SELF;
			case Address::CLASS:
				return GDScriptFunction::ADDR_CLASS;
			case Address::MEMBER:
				return p_address.address | (GDScriptFunction::ADDR_TYPE_MEMBER << GDScriptFunction::ADDR_BITS);
			case Address::CONSTANT:
				return p_address.address | (GDScriptFunction::ADDR_TYPE_CONSTANT << GDScriptFunction::ADDR_BITS);
			case Address::LOCAL_VARIABLE:
			case Address::FUNCTION_PARAMETER:
				return p_address.address | (GDScriptFunction::ADDR_TYPE_STACK << GDScriptFunction::ADDR_BITS);
			case Address::TEMPORARY:
				temporaries.write[p_address.address].bytecode_indices.push_back(opcodes.size());
				return -1;
			case Address::NIL:
				return GDScriptFunction::ADDR_NIL;
		}
		return -1; 
	}
	void append_opcode(GDScriptFunction::Opcode p_code) {
		opcodes.push_back(p_code);
	}
	void append_opcode_and_argcount(GDScriptFunction::Opcode p_code, int p_argument_count) {