### 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_call_self(temp, codegen.script->member_indices[identifier].getter, args);
						return temp;
					} else {
						
						int idx = codegen.script->member_indices[identifier].index;
						return GDScriptCodeGenerator::Address(GDScriptCodeGenerator::Address::MEMBER, idx, codegen.script->get_member_type(identifier));
					}
				}
			}
			
			{
				GDScript *owner = codegen.script;
				while (owner) {
					GDScript *scr = owner;
					GDScriptNativeClass *nc = nullptr;
					while (scr) {
						if (scr->constants.has(identifier)) {
							return codegen.add_constant(scr->constants[identifier]); 
						}
						if (scr->native.is_valid()) {
							nc = scr->native.ptr();
						}
						scr = scr->_base;
					}
					
					if (nc) {
						bool success = false;
						int64_t constant = ClassDB::get_integer_constant(nc->get_name(), identifier, &success);
						if (success) {
							return codegen.add_constant(constant);