### Godot version

v4.0.beta11.official [91713ced8]

### System information

Windows 10

### Issue description

Resizing a PackedByteArray will immediately crash.

```
Godot Engine v4.0.beta.custom_build.91713ced8 - https://godotengine.org
Vulkan API 1.3.224 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce RTX 3090


================================================================
CrashHandlerException: Program crashed
Engine version: Godot Engine v4.0.beta.custom_build (91713ced81792b10fdc9367b7f355738e5d52777)
Dumping the backtrace. Please include this when reporting the bug on: https://github.com/godotengine/godot/issues
[0] std::_Atomic_storage<unsigned int,4>::load (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\)
[1] std::_Atomic_storage<unsigned int,4>::load (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\)
[2] SafeNumeric<unsigned int>::get (C:\Users\Chris\Development\godot\godot\core\templates\safe_refcount.h:72)
[3] SafeRefCount::_check_unref_sanity (C:\Users\Chris\Development\godot\godot\core\templates\safe_refcount.h:173)
[4] SafeRefCount::unref (C:\Users\Chris\Development\godot\godot\core\templates\safe_refcount.h:193)
[5] Variant::PackedArrayRefBase::destroy (C:\Users\Chris\Development\godot\godot\core\variant\variant.h:199)
[6] Variant::_clear_internal (C:\Users\Chris\Development\godot\godot\core\variant\variant.cpp:1382)
[7] Variant::clear (C:\Users\Chris\Development\godot\godot\core\variant\variant.h:304)
[8] Variant::~Variant (C:\Users\Chris\Development\godot\godot\core\variant\variant.h:778)
[9] Variant::`scalar deleting destructor'
[10] GDScriptFunction::call (C:\Users\Chris\Development\godot\godot\modules\gdscript\gdscript_vm.cpp:3541)
[11] GDScriptInstance::callp (C:\Users\Chris\Development\godot\godot\modules\gdscript\gdscript.cpp:1847)
[12] Object::callp (C:\Users\Chris\Development\godot\godot\core\object\object.cpp:711)
[13] Variant::callp (C:\Users\Chris\Development\godot\godot\core\variant\variant_call.cpp:1161)
[14] GDScriptFunction::call (C:\Users\Chris\Development\godot\godot\modules\gdscript\gdscript_vm.cpp:1551)
[15] GDScriptInstance::callp (C:\Users\Chris\Development\godot\godot\modules\gdscript\gdscript.cpp:1847)
[16] Object::callp (C:\Users\Chris\Development\godot\godot\core\object\object.cpp:711)
[17] Variant::callp (C:\Users\Chris\Development\godot\godot\core\variant\variant_call.cpp:1161)
[18] GDScriptFunction::call (C:\Users\Chris\Development\godot\godot\modules\gdscript\gdscript_vm.cpp:1583)
[19] GDScriptInstance::callp (C:\Users\Chris\Development\godot\godot\modules\gdscript\gdscript.cpp:1847)
[20] Node::_gdvirtual__ready_call<0> (C:\Users\Chris\Development\godot\godot\scene\main\node.h:242)
[21] Node::_notification (C:\Users\Chris\Development\godot\godot\scene\main\node.cpp:156)
[22] Node::_notificationv (C:\Users\Chris\Development\godot\godot\scene\main\node.h:46)
[23] Object::notification (C:\Users\Chris\Development\godot\godot\core\object\object.cpp:792)
[24] Node::_propagate_ready (C:\Users\Chris\Development\godot\godot\scene\main\node.cpp:189)
[25] Node::_propagate_ready (C:\Users\Chris\Development\godot\godot\scene\main\node.cpp:181)
[26] Node::_set_tree (C:\Users\Chris\Development\godot\godot\scene\main\node.cpp:2595)
[27] SceneTree::initialize (C:\Users\Chris\Development\godot\godot\scene\main\scene_tree.cpp:411)
[28] OS_Windows::run (C:\Users\Chris\Development\godot\godot\platform\windows\os_windows.cpp:1275)
[29] widechar_main (C:\Users\Chris\Development\godot\godot\platform\windows\godot_windows.cpp:181)
[30] _main (C:\Users\Chris\Development\godot\godot\platform\windows\godot_windows.cpp:203)
[31] main (C:\Users\Chris\Development\godot\godot\platform\windows\godot_windows.cpp:217)
[32] WinMain (C:\Users\Chris\Development\godot\godot\platform\windows\godot_windows.cpp:231)
[33] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[34] <couldn't map PC to fn name>
-- END OF BACKTRACE --
================================================================
```

### Steps to reproduce

```gdscript
var pba: PackedByteArray = PackedByteArray()
pba.resize(4)
```

### Minimal reproduction project

[byte-array.zip](https://github.com/godotengine/godot/files/10386136/byte-array.zip)

append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_COLOR);
			break;
		case Variant::STRING_NAME:
			append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_STRING_NAME);
			break;
		case Variant::NODE_PATH:
			append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_NODE_PATH);
			break;
		case Variant::RID:
			append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_RID);
			break;
		case Variant::OBJECT:
			append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_OBJECT);
			break;
		case Variant::CALLABLE:
			append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_CALLABLE);
			break;
		case Variant::SIGNAL:
			append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_SIGNAL);
			break;
		case Variant::DICTIONARY:
			append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_DICTIONARY);
			break;
		case Variant::ARRAY:
			append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_ARRAY);
			break;
		case Variant::PACKED_BYTE_ARRAY:
			append_opcode(GDScriptFunction::OPCODE_TYPE_ADJUST_PACKED_BYTE_ARRAY);
			break;
		case Variant::PACKED_INT32_ARRAY: