### Godot version

4.0beta13

### System information

Windows10, AMD Ryzen 9 3900XT, RTX3070, Vulkan

### Issue description

I would expect when using the scale tool on an object with a scale of (1,1,1) without touching any of the handles to result in a uniform scale again (i.e. 0.1, 0.1, 0.1) and not one, where all components are different.
However, when the object has been rotated, this is the case no matter if using local or global transform.

![RotateAndScaleBroken](https://user-images.githubusercontent.com/53947784/213452728-d03427dd-be89-4bba-8dba-fbade6627555.gif)

This behavior was working properly in 3.x

### Steps to reproduce

- Create an object (e.g. a CSGBox3D)
- Rotate it a little on different axes
- Scale it with the scale tool, without using any handle (uniform scale)
- Observe how the object is now slightly squashed or stretched, i.e. the scale components are not equal anymore

### Minimal reproduction project

[BrokenScale.zip](https://github.com/godotengine/godot/files/10457086/BrokenScale.zip)

Observe how the cube turns into a pillar when using the Scale Manipulator.
#include "scene/3d/world_environment.h"
#include "scene/gui/center_container.h"
#include "scene/gui/color_picker.h"
#include "scene/gui/flow_container.h"
#include "scene/gui/split_container.h"
#include "scene/gui/subviewport_container.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/sky_material.h"
#include "scene/resources/surface_tool.h"
constexpr real_t DISTANCE_DEFAULT = 4;
constexpr real_t GIZMO_ARROW_SIZE = 0.35;
constexpr real_t GIZMO_RING_HALF_WIDTH = 0.1;
constexpr real_t GIZMO_PLANE_SIZE = 0.2;
constexpr real_t GIZMO_PLANE_DST = 0.3;
constexpr real_t GIZMO_CIRCLE_SIZE = 1.1;
constexpr real_t GIZMO_SCALE_OFFSET = GIZMO_CIRCLE_SIZE + 0.3;
constexpr real_t GIZMO_ARROW_OFFSET = GIZMO_CIRCLE_SIZE + 0.3;
constexpr real_t ZOOM_FREELOOK_MIN = 0.01;
constexpr real_t ZOOM_FREELOOK_MULTIPLIER = 1.08;
constexpr real_t ZOOM_FREELOOK_INDICATOR_DELAY_S = 1.5;
#ifdef REAL_T_IS_DOUBLE
constexpr double ZOOM_FREELOOK_MAX = 1'000'000'000'000;
#else
constexpr float ZOOM_FREELOOK_MAX = 10'000;
#endif
constexpr real_t MIN_Z = 0.01;
constexpr real_t MAX_Z = 1000000.0;
constexpr real_t MIN_FOV = 0.01;
constexpr real_t MAX_FOV = 179;
void ViewportNavigationControl::_notification(int p_what) {