### 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
type(p_type) {}
	};
	const static int RESERVED_STACK = 3; 
	bool ended = false;
	GDScriptFunction *function = nullptr;
	bool debug_stack = false;
	Vector<int> opcodes;
	List<RBMap<StringName, int>> stack_id_stack;
	RBMap<StringName, int> stack_identifiers;
	List<int> stack_identifiers_counts;
	RBMap<StringName, int> local_constants;
	Vector<StackSlot> locals;
	Vector<StackSlot> temporaries;
	List<int> used_temporaries;
	RBMap<Variant::Type, List<int>> temporaries_pool;
	List<GDScriptFunction::StackDebug> stack_debug;
	List<RBMap<StringName, int>> block_identifier_stack;
	RBMap<StringName, int> block_identifiers;
	int max_locals = 0;
	int current_line = 0;
	int instr_args_max = 0;
	int ptrcall_max = 0;
#ifdef DEBUG_ENABLED
	List<int> temp_stack;
#endif
	HashMap<Variant, int, VariantHasher, VariantComparator> constant_map;
	RBMap<StringName, int> name_map;
#ifdef TOOLS_ENABLED
	Vector<StringName> named_globals;
#endif