### Godot version

Godot 4 beta10

### System information

Windows 10 64 bits NVIDIA GeForce GTX 1060

### Issue description

After porting a project to Godot 4 beta10, I found out my game crashed very consistently everytime I did a particular action. I tried to reproduce it with my older debug build, but it did not reproduce. But after I rebuilt it with the latest commit, it happened, with the following C++ stack trace:

```
Exception has occurred: W32/0xC0000005
Unhandled exception at 0x00007FF64CF49CF0 in godot.windows.editor.dev.x86_64.exe: 0xC0000005: Access violation executing location 0x00007FF64CF49CF0.

00007ff64cf49cf0() (Unknown Source:0)
call_with_variant_args_retc_helper<Resource,Ref<Resource>,bool,0>(Resource * p_instance, Ref<Resource>(const Resource::*)(bool) p_method, const Variant * * p_args, Variant & r_ret, Callable::CallError & r_error, IndexSequence<0> __formal) Line 731 (godot4_fork\core\variant\binder_common.h:731)
call_with_variant_args_retc_dv<Resource,Ref<Resource>,bool>(Resource * p_instance, Ref<Resource>(const Resource::*)(bool) p_method, const Variant * * p_args, int p_argcount, Variant & r_ret, Callable::CallError & r_error, const Vector<Variant> & default_values) Line 527 (godot4_fork\core\variant\binder_common.h:527)
MethodBindTRC<Resource,Ref<Resource>,bool>::call(Object * p_object, const Variant * * p_args, int p_arg_count, Callable::CallError & r_error) Line 546 (godot4_fork\core\object\method_bind.h:546)
GDScriptFunction::call(GDScriptInstance * p_instance, const Variant * * p_args, int p_argcount, Callable::CallError & r_err, GDScriptFunction::CallState * p_state) Line 1644 (godot4_fork\modules\gdscript\gdscript_vm.cpp:1644)
GDScriptInstance::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 1830 (godot4_fork\modules\gdscript\gdscript.cpp:1830)
Object::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 711 (godot4_fork\core\object\object.cpp:711)
Variant::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Variant & r_ret, Callable::CallError & r_error) Line 1159 (godot4_fork\core\variant\variant_call.cpp:1159)
GDScriptFunction::call(GDScriptInstance * p_instance, const Variant * * p_args, int p_argcount, Callable::CallError & r_err, GDScriptFunction::CallState * p_state) Line 1538 (godot4_fork\modules\gdscript\gdscript_vm.cpp:1538)
GDScriptInstance::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 1830 (godot4_fork\modules\gdscript\gdscript.cpp:1830)
Object::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 711 (godot4_fork\core\object\object.cpp:711)
Variant::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Variant & r_ret, Callable::CallError & r_error) Line 1159 (godot4_fork\core\variant\variant_call.cpp:1159)
GDScriptFunction::call(GDScriptInstance * p_instance, const Variant * * p_args, int p_argcount, Callable::CallError & r_err, GDScriptFunction::CallState * p_state) Line 1538 (godot4_fork\modules\gdscript\gdscript_vm.cpp:1538)
GDScriptInstance::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 1830 (godot4_fork\modules\gdscript\gdscript.cpp:1830)
Object::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 711 (godot4_fork\core\object\object.cpp:711)
Variant::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Variant & r_ret, Callable::CallError & r_error) Line 1159 (godot4_fork\core\variant\variant_call.cpp:1159)
GDScriptFunction::call(GDScriptInstance * p_instance, const Variant * * p_args, int p_argcount, Callable::CallError & r_err, GDScriptFunction::CallState * p_state) Line 1538 (godot4_fork\modules\gdscript\gdscript_vm.cpp:1538)
GDScriptInstance::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 1830 (godot4_fork\modules\gdscript\gdscript.cpp:1830)
Object::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 711 (godot4_fork\core\object\object.cpp:711)
Variant::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Variant & r_ret, Callable::CallError & r_error) Line 1159 (godot4_fork\core\variant\variant_call.cpp:1159)
GDScriptFunction::call(GDScriptInstance * p_instance, const Variant * * p_args, int p_argcount, Callable::CallError & r_err, GDScriptFunction::CallState * p_state) Line 1538 (godot4_fork\modules\gdscript\gdscript_vm.cpp:1538)
GDScriptInstance::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 1830 (godot4_fork\modules\gdscript\gdscript.cpp:1830)
Object::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 711 (godot4_fork\core\object\object.cpp:711)
Variant::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Variant & r_ret, Callable::CallError & r_error) Line 1159 (godot4_fork\core\variant\variant_call.cpp:1159)
GDScriptFunction::call(GDScriptInstance * p_instance, const Variant * * p_args, int p_argcount, Callable::CallError & r_err, GDScriptFunction::CallState * p_state) Line 1555 (godot4_fork\modules\gdscript\gdscript_vm.cpp:1555)
GDScriptInstance::callp(const StringName & p_method, const Variant * * p_args, int p_argcount, Callable::CallError & r_error) Line 1830 (godot4_fork\modules\gdscript\gdscript.cpp:1830)
Node::_gdvirtual__physics_process_call<0>(double arg1) Line 238 (godot4_fork\scene\main\node.h:238)
Node::_notification(int p_notification) Line 61 (godot4_fork\scene\main\node.cpp:61)
Node::_notificationv(int p_notification, bool p_reversed) Line 45 (godot4_fork\scene\main\node.h:45)
Object::notification(int p_notification, bool p_reversed) Line 792 (godot4_fork\core\object\object.cpp:792)
SceneTree::_notify_group_pause(const StringName & p_group, int p_notification) Line 876 (godot4_fork\scene\main\scene_tree.cpp:876)
SceneTree::physics_process(double p_time) Line 429 (godot4_fork\scene\main\scene_tree.cpp:429)
Main::iteration() Line 3163 (godot4_fork\main\main.cpp:3163)
OS_Windows::run() Line 1274 (godot4_fork\platform\windows\os_windows.cpp:1274)
widechar_main(int argc, wchar_t * * argv) Line 181 (godot4_fork\platform\windows\godot_windows.cpp:181)
_main() Line 203 (godot4_fork\platform\windows\godot_windows.cpp:203)
main(int argc, char * * argv) Line 217 (godot4_fork\platform\windows\godot_windows.cpp:217)
WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 231 (godot4_fork\platform\windows\godot_windows.cpp:231)
invoke_main() Line 107 (d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:107)
__scrt_common_main_seh() Line 288 (d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
__scrt_common_main() Line 331 (d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
WinMainCRTStartup(void * __formal) Line 17 (d:\a01\_work\12\s\src\vctools\crt\vcstartup\src\startup\exe_winmain.cpp:17)
kernel32.dll!00007ff894347614() (Unknown Source:0)
ntdll.dll!00007ff895dc26a1() (Unknown Source:0)
```

~~Since that crash did not occur at all in my older version, I tried bisecting to find which commit made it happen. And I was surprised to find that d4fbe1ef061d0e058a2700cfd4f602e55e126f65 is the first commit from where the crash happens. This commit is the update of the HarfBuzz library. I have no idea how it relates to GDScript, but for sure the crash keeps happening onwards.~~
Bisected properly: https://github.com/godotengine/godot/issues/70856#issuecomment-1370242332


### Steps to reproduce

For now my only reproduction is my entire game... the action to perform is quick, but there is so much stuff going on that it's really not minimal.

In GDScript, the kind of code that was running is this:
```gdscript
	if not hulls.has(scale):
		print("Generating new ConvexHull for ", hull, " scale ", scale)
		print("C")
		scaled_hull = hull.duplicate()
		print("D")
```

Godot crashed after printing `C`, and did not print `D`.

`hull` is an instance of a script I made, which inherits `RefCounted`, and has a `duplicate` method I made. GDScript is trying to call it, but crashes instead. The object exists, it gets printed as `<RefCounted#-9223371988704164593>`. I added a print at the first line of `duplicate`, but it's not even reached.

```gdscript
func duplicate():
	print("A") # This does not even print
	var d = get_script().new()
	print("B")
	d._planes = _planes.duplicate()
	# This one is a poolvector
	d._vertices = _vertices
	d._aabb = _aabb
	d._center = _center
	d._radius = _radius
	return d
```

### Minimal reproduction project

The project I reproduce this with is one I haven't considered open-sourcing yet, but if you want it just for working on the bug, I can provide an archive on RocketChat.
GDScriptParser::DataType nil_type;
	nil_type.builtin_type = Variant::NIL;
	nil_type.type_source = GDScriptParser::DataType::ANNOTATED_INFERRED;
	return get_operation_type(p_operation, p_a, nil_type, r_valid, p_source);
}
GDScriptParser::DataType GDScriptAnalyzer::get_operation_type(Variant::Operator p_operation, const GDScriptParser::DataType &p_a, const GDScriptParser::DataType &p_b, bool &r_valid, const GDScriptParser::Node *p_source) {
	GDScriptParser::DataType result;
	result.kind = GDScriptParser::DataType::VARIANT;
	Variant::Type a_type = p_a.builtin_type;
	Variant::Type b_type = p_b.builtin_type;
	if (p_a.kind == GDScriptParser::DataType::ENUM) {
		if (p_a.is_meta_type) {
			a_type = Variant::DICTIONARY;
		} else {
			a_type = Variant::INT;
		}
	}
	if (p_b.kind == GDScriptParser::DataType::ENUM) {
		if (p_b.is_meta_type) {