Repository: godot
Issue: Rotating a node 90/180 degrees through the Euler angle rotation mode in inspector does not produce the same basis as using the quaternion or matrix properties.
Labels: discussion,topic:editor,documentation,needs testing,topic:3d

### Tested versions

Reproducible in:
- v3.5.3.stable.official [6c814135b]
- v4.0.4.stable.official [fc0b241c9]
- v4.2.2.stable.official [15073afe3]
- v4.3.beta1.official [a4f2ea91a]

### System information

Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 31.0.15.3758) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)

### Issue description

I am unsure if this is actually a bug, because of:
- My limited knowledge. This might be an expected precision issue.
- It is reproducible in all the versions I've tested back to 3.5.3

The issue is:
When rotating a Node3D 90 or 180 degrees by using the Euler angle properties in the inspector, the resulting basis is not identical to the one produced by performing the same rotation using the quaternion or basis rotation edit modes.

E.g., rotating th x-axis 90 degrees produces the following transform when the scene is viewed in Notepad++:
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)

![billede](https://github.com/godotengine/godot/assets/91982860/f049775c-bca8-4215-8372-b16e966789a9)


Rotating the node by pasting the quaternion (0.707, 0, 0, 0.707) into the quaternion field produces the following basis:
transform = Transform3D(1, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0)

![billede](https://github.com/godotengine/godot/assets/91982860/9266a9f5-6335-4251-9371-a884cdddb6ee)


Rotating the node using the basis rotation mode also produces the following basis:
transform = Transform3D(1, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0)

![billede](https://github.com/godotengine/godot/assets/91982860/5b84f312-e8a7-4a33-91e7-17c5beaad3e3)


Switching rotation modes:
Switching the rotation edit mode to quaternion or basis modes after having rotated using Euler retains the Euler-derived basis:
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)

![billede](https://github.com/godotengine/godot/assets/91982860/6ae716e7-5db5-4f08-8df8-e37fae5097a6)


Switching to Euler rotation mode after having first rotated via quaternion or basis retains the quaternion/basis-derived basis:

![billede](https://github.com/godotengine/godot/assets/91982860/aa4eb516-09fd-4b87-9436-eb69606b7c16)


Like I said, I do not really know if this is expected behaviour, e.g., due to precision issues, but it does seem a little odd to me.

### Steps to reproduce

- Create a scene with a node3d (or any derived node) or use the included MRP
- Rotate the node 90 degrees around the x-axis using the Euler angle property in the inspector
- Inspect the tscn file, e.g. in Notepad++
- Observe that the transform of the node = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
- Reset the rotation
- Introduce the same rotation by, e.g, entering 1 in the x-field of the quaternion property (1, 0, 0, 1 -> 0.707, 0, 0, 0.707)
- Observe that the transform of the node = Transform3D(1, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0)
- Try switching rotations modes after having started with each rotation mode.

### Minimal reproduction project (MRP)

[rotation_test.zip](https://github.com/user-attachments/files/15747661/rotation_test.zip)