### 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
CASE_TYPE(VECTOR2I);
			CASE_TYPE(RECT2);
			CASE_TYPE(RECT2I);
			CASE_TYPE(VECTOR3);
			CASE_TYPE(VECTOR3I);
			CASE_TYPE(TRANSFORM2D);
			CASE_TYPE(PLANE);
			CASE_TYPE(AABB);
			CASE_TYPE(BASIS);
			CASE_TYPE(TRANSFORM3D);
			CASE_TYPE(COLOR);
			CASE_TYPE(STRING_NAME);
			CASE_TYPE(NODE_PATH);
			CASE_TYPE(RID);
			CASE_TYPE(QUATERNION);
			CASE_TYPE(OBJECT);
			CASE_TYPE(CALLABLE);
			CASE_TYPE(SIGNAL);
			CASE_TYPE(DICTIONARY);
			CASE_TYPE(ARRAY);
			CASE_TYPE(PACKED_BYTE_ARRAY);
			CASE_TYPE(PACKED_INT32_ARRAY);
			CASE_TYPE(PACKED_INT64_ARRAY);
			CASE_TYPE(PACKED_FLOAT32_ARRAY);
			CASE_TYPE(PACKED_FLOAT64_ARRAY);
			CASE_TYPE(PACKED_STRING_ARRAY);
			CASE_TYPE(PACKED_VECTOR2_ARRAY);
			CASE_TYPE(PACKED_VECTOR3_ARRAY);
			CASE_TYPE(PACKED_COLOR_ARRAY);
			default: