### Godot version

4.1dev 4c677c88

### System information

Windows 10

### Issue description

A use-after-free situation exists in SkeletonIK3D because it holds hard references to both SkeletonIK3D and the target node Node3D.



### Steps to reproduce

1. Open the attached reference project.
2. It should already have a scene named `vrm_1_constraint_twist_sample.tscn` open. If not, open that specific scene.
3. Select the SkeletonIK3D node and click Play IK in the toolbar (this step is usually not necessary)
4. Middle click the scene tab or close the scene tab another way.
5. It crashes because bones._cowdata._ptr[172] and higher (up to [400]) have corrupt data on my system. This type of memory corruption is often caused by use-after-free.

That said, due to the nature of memory allocations and undefined behavior, this problem may be uniquely reproducible on my system.

### Minimal reproduction project

[crash_when_closing_tab.zip](https://github.com/godotengine/godot/files/11561795/crash_when_closing_tab.zip)

#ifndef SKELETON_IK_3D_H
#define SKELETON_IK_3D_H
#ifndef _3D_DISABLED
#include "scene/3d/skeleton_3d.h"
class FabrikInverseKinematic {
	struct EndEffector {
		BoneId tip_bone;
		Transform3D goal_transform;
	};
	struct ChainItem {
		Vector<ChainItem> children;
		ChainItem *parent_item = nullptr;
		
		BoneId bone = -1;
		real_t length = 0.0;
		
		Transform3D initial_transform;
		Vector3 current_pos;
		
		Vector3 current_ori;
		ChainItem *find_child(const BoneId p_bone_id);
		ChainItem *add_child(const BoneId p_bone_id);
	};
	struct ChainTip {
		ChainItem *chain_item = nullptr;
		const EndEffector *end_effector = nullptr;
		ChainTip() {}