### 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)

real_t m20 = rows[2][0];
	real_t m21 = rows[2][1];
	real_t m22 = rows[2][2];
	p_values[0] = src[0];
	p_values[1] = m11 * src[1] - m12 * src[2] + m10 * src[3];
	p_values[2] = -m21 * src[1] + m22 * src[2] - m20 * src[3];
	p_values[3] = m01 * src[1] - m02 * src[2] + m00 * src[3];
	real_t sh0 = src[7] + src[8] + src[8] - src[5];
	real_t sh1 = src[4] + s_rc2 * src[6] + src[7] + src[8];
	real_t sh2 = src[4];
	real_t sh3 = -src[7];
	real_t sh4 = -src[5];
	
	real_t r2x = m00 + m01;
	real_t r2y = m10 + m11;
	real_t r2z = m20 + m21;
	real_t r3x = m00 + m02;
	real_t r3y = m10 + m12;
	real_t r3z = m20 + m22;
	real_t r4x = m01 + m02;
	real_t r4y = m11 + m12;
	real_t r4z = m21 + m22;
	
	
	real_t sh0_x = sh0 * m00;
	real_t sh0_y = sh0 * m10;
	real_t d0 = sh0_x * m10;
	real_t d1 = sh0_y * m20;
	real_t d2 = sh0 * (m20 * m20 + s_c4_div_c3);
	real_t d3 = sh0_x * m20;