Reproduction steps:
1. Open the attached user's project ("Tru..2021")
2. Open scene "Scenes/SampleScene"
3. In the scene hierarchy, expand the Canvas
4. Duplicate either of the objects inside it (CTRL + D or CMD + D)
5. Undo the duplication
Expected result: The duplication gets undone and the new object is deleted
Actual result: The Editor crashes
Reproducible with: 2021.2.0a20, 2021.3.24f1, 2022.1.0a1
Not reproducible with: 2020.3.47f1, 2021.2.0a19, 2022.2.16f1, 2023.2.0a13
Reproducible on: macOS 13.3.1 (Intel)
Stacktrace:
0x00007ff62ef1c9dd (Unity) Transform::FlushDelayedSetDirty
0x00007ff62fb58a12 (Unity) SceneTracker::FlushDirty
0x00007ff63005826c (Unity) UndoManager::PostApply
0x00007ff630052273 (Unity) UndoManager::ApplyUndo
0x00007ff63005bac7 (Unity) UndoManager::Undo
0x00007ff62fb556a0 (Unity) MenuController::ExecuteMenuItem