### 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
switch (p_target.type.kind) {
		case GDScriptDataType::BUILTIN: {
			if (p_target.type.builtin_type == Variant::ARRAY && p_target.type.has_container_element_type()) {
				append_opcode(GDScriptFunction::OPCODE_ASSIGN_TYPED_ARRAY);
				append(p_target);
				append(p_source);
			} else {
				append_opcode(GDScriptFunction::OPCODE_ASSIGN_TYPED_BUILTIN);
				append(p_target);
				append(p_source);
				append(p_target.type.builtin_type);
			}
		} break;
		case GDScriptDataType::NATIVE: {
			int class_idx = GDScriptLanguage::get_singleton()->get_global_map()[p_target.type.native_type];
			Variant nc = GDScriptLanguage::get_singleton()->get_global_array()[class_idx];
			class_idx = get_constant_pos(nc) | (GDScriptFunction::ADDR_TYPE_CONSTANT << GDScriptFunction::ADDR_BITS);
			append_opcode(GDScriptFunction::OPCODE_ASSIGN_TYPED_NATIVE);
			append(p_target);
			append(p_source);
			append(class_idx);
		} break;
		case GDScriptDataType::SCRIPT:
		case GDScriptDataType::GDSCRIPT: {
			Variant script = p_target.type.script_type;
			int idx = get_constant_pos(script) | (GDScriptFunction::ADDR_TYPE_CONSTANT << GDScriptFunction::ADDR_BITS);
			append_opcode(GDScriptFunction::OPCODE_ASSIGN_TYPED_SCRIPT);
			append(p_target);