### Godot version

v4.0.3.stable.arch_linux

### System information

archlinux

### Issue description

The code below will crash the engine without any error or warning from the editor.
```
var arr := [1,2,3,4,5,6,7,8,9]
func _ready():
	print(arr.slice(50, 0, -1))
```
Here the console log:
```
handle_crash: Program crashed with signal 4
Engine version: Godot Engine v4.0.3.stable.arch_linux
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x39ab0) [0x7f886a04fab0] (??:0)
[2] /usr/bin/godot(+0x46ee2f3) [0x56088fdb82f3] (??:?)
[3] /usr/bin/godot(+0x472b175) [0x56088fdf5175] (??:?)
[4] /usr/bin/godot(+0x47383d8) [0x56088fe023d8] (??:?)
[5] /usr/bin/godot(+0x1512883) [0x56088cbdc883] (??:?)
[6] /usr/bin/godot(+0x13fa8fd) [0x56088cac48fd] (??:?)
[7] /usr/bin/godot(+0x2e5fe23) [0x56088e529e23] (??:?)
[8] /usr/bin/godot(+0x3389728) [0x56088ea53728] (??:?)
[9] /usr/bin/godot(+0x48ba7a8) [0x56088ff847a8] (??:?)
[10] /usr/bin/godot(+0x2e28d96) [0x56088e4f2d96] (??:?)
[11] /usr/bin/godot(+0x2e28d37) [0x56088e4f2d37] (??:?)
[12] /usr/bin/godot(+0x2e5d5bf) [0x56088e5275bf] (??:?)
[13] /usr/bin/godot(+0x2e5eb33) [0x56088e528b33] (??:?)
[14] /usr/bin/godot(+0x10a1479) [0x56088c76b479] (??:?)
[15] /usr/lib/libc.so.6(+0x23850) [0x7f886a039850] (??:0)
[16] /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f886a03990a] (??:0)
[17] /usr/bin/godot(+0x10afda5) [0x56088c779da5] (??:?)
-- END OF BACKTRACE --
```

### Steps to reproduce

n/a

### Minimal reproduction project

n/a
return _p->typed.type;
}
StringName Array::get_typed_class_name() const {
	return _p->typed.class_name;
}
Variant Array::get_typed_script() const {
	return _p->typed.script;
}
void Array::make_read_only() {
	if (_p->read_only == nullptr) {
		_p->read_only = memnew(Variant);
	}
}
bool Array::is_read_only() const {
	return _p->read_only != nullptr;
}
Array::Array(const Array &p_from) {
	_p = nullptr;
	_ref(p_from);
}
Array::Array() {
	_p = memnew(ArrayPrivate);
	_p->refcount.init();
}
Array::~Array() {
	_unref();
}