### Godot version

4.2 dev3

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

Basically variation of #33995

### Steps to reproduce

1. Open 2D scene
2. Drag a guide
3. Undo
4. Save

### Minimal reproduction project

N/A
Size2 parent_scale = parent_xform.get_scale();
				scale_factor *= Vector2(1.0 / parent_scale.x, 1.0 / parent_scale.y);
				if (drag_type == DRAG_SCALE_X) {
					scale.x += scale_factor.x;
					if (uniform) {
						scale.y = scale.x * ratio;
					}
				} else if (drag_type == DRAG_SCALE_Y) {
					scale.y -= scale_factor.y;
					if (uniform) {
						scale.x = scale.y / ratio;
					}
				}
			}
			if (snap_scale && !is_ctrl) {
				if (snap_relative) {
					scale.x = original_scale.x * (roundf((scale.x / original_scale.x) / snap_scale_step) * snap_scale_step);
					scale.y = original_scale.y * (roundf((scale.y / original_scale.y) / snap_scale_step) * snap_scale_step);
				} else {
					scale.x = roundf(scale.x / snap_scale_step) * snap_scale_step;
					scale.y = roundf(scale.y / snap_scale_step) * snap_scale_step;
				}
			}
			ci->_edit_set_scale(scale);
			return true;
		}
		
		if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && !b->is_pressed()) {
			if (drag_selection.size() != 1) {
				_commit_canvas_item_state(