### 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.
return; /
	}
	bool orthogonal = camera->get_projection() == Camera3D::PROJECTION_ORTHOGONAL;
	Vector<Color> grid_colors[3];
	Vector<Vector3> grid_points[3];
	Vector<Vector3> grid_normals[3];
	Color primary_grid_color = EDITOR_GET("editors/3d/primary_grid_color");
	Color secondary_grid_color = EDITOR_GET("editors/3d/secondary_grid_color");
	int grid_size = EDITOR_GET("editors/3d/grid_size");
	int primary_grid_steps = EDITOR_GET("editors/3d/primary_grid_steps");
	/
	grid_enable[0] = grid_visible[0] = EDITOR_GET("editors/3d/grid_xy_plane");
	grid_enable[1] = grid_visible[1] = EDITOR_GET("editors/3d/grid_yz_plane");
	grid_enable[2] = grid_visible[2] = EDITOR_GET("editors/3d/grid_xz_plane");
	/
	/
	real_t division_level_bias = EDITOR_GET("editors/3d/grid_division_level_bias");
	/
	int division_level_max = EDITOR_GET("editors/3d/grid_division_level_max");
	/
	int division_level_min = EDITOR_GET("editors/3d/grid_division_level_min");
	ERR_FAIL_COND_MSG(division_level_max < division_level_min, "The 3D grid's maximum division level cannot be lower than its minimum division level.");
	if (primary_grid_steps != 10) { /
		/
		real_t div = Math::log((real_t)primary_grid_steps) / (real_t)2.302585092994045901094;
		/
		division_level_max = (int)(division_level_max / div);
		division_level_min = (int)(division_level_min / div);
	}
	for (int a = 0; a < 3; a++) {