### Godot version

4.0.2

### System information

Windows 10 960m

### Issue description

When using the skeltonIK3d on a simple bone chain, the roll axis of bones are not working correctly. As can be seen in this clip comparing 3.5 to 4.0.2, when moving the ik target on the x axis, the bone roll of the shin bone twists in a very strange way.

When the ik target is just moving up and down on the y axis 4.0.2 looks the same as 3.5. I have tried many ways of setting the roll axis in blender before exporting, but this seems to make no difference in godot.

https://github.com/godotengine/godot/assets/7741669/524f9450-8582-4336-96a2-397ffe915d2d

@lyuma I also tried this with your recent fix in master and it does not fix this issue, unfortunately. I did try the scorpion demo scene and I can see that it resolved that. Simple 2 or 3 bone chains seem to exhibit this odd roll issue...maybe the long chain on the scorpion tail is covering up the issue?

On a side note, I am getting tons of crashes trying to test out simple ik with the standard tool script. Especially just clicking in the skeletonik3d node. 

### Steps to reproduce

- import a simple 2 or 3 bone skeleton such as a leg
- add a skeltonik3d node
- fill in the node parameters and add a marker3d as target
- add a tool script to start off the ik solve
- move the ik target on the x axis and observe the twisting

### Minimal reproduction project

This has the 3.5, 4.0.2 file and the blend file

[ik_roll_bug.zip](https://github.com/godotengine/godot/files/11521836/ik_roll_bug.zip)

Quaternion from(*this);
	Quaternion to(p_to);
	Basis b(from.slerp(to, p_weight));
	b.rows[0] *= Math::lerp(rows[0].length(), p_to.rows[0].length(), p_weight);
	b.rows[1] *= Math::lerp(rows[1].length(), p_to.rows[1].length(), p_weight);
	b.rows[2] *= Math::lerp(rows[2].length(), p_to.rows[2].length(), p_weight);
	return b;
}
void Basis::rotate_sh(real_t *p_values) {
	
	
	
	const static real_t s_c3 = 0.94617469575; 
	const static real_t s_c4 = -0.31539156525; 
	const static real_t s_c5 = 0.54627421529; 
	const static real_t s_c_scale = 1.0 / 0.91529123286551084;
	const static real_t s_c_scale_inv = 0.91529123286551084;
	const static real_t s_rc2 = 1.5853309190550713 * s_c_scale;
	const static real_t s_c4_div_c3 = s_c4 / s_c3;
	const static real_t s_c4_div_c3_x2 = (s_c4 / s_c3) * 2.0;
	const static real_t s_scale_dst2 = s_c3 * s_c_scale_inv;
	const static real_t s_scale_dst4 = s_c5 * s_c_scale_inv;
	const real_t src[9] = { p_values[0], p_values[1], p_values[2], p_values[3], p_values[4], p_values[5], p_values[6], p_values[7], p_values[8] };
	real_t m00 = rows[0][0];
	real_t m01 = rows[0][1];
	real_t m02 = rows[0][2];
	real_t m10 = rows[1][0];
	real_t m11 = rows[1][1];
	real_t m12 = rows[1][2];