Reproduction steps:
1. Open the attached “BugRepro” Project
2. Open the “Assets/Scenes/SampleScene” Scene
3. Open the Undo History window (Edit > Undo History)
4. In the Tile Palette window (Window > 2D > Tile Palette), select the Selection tool
5. In the Scene view, select 3 tiles one by one
6. In the Tile Palette window, select the Brush tool
7. In the Scene view, paint 1 tile
8. Press undo (Ctrl/Cmd + Z) 2 times
9. Observe the Undo History window
Expected result: All actions done up to this point are visible
Actual result: “Paint” action disappeared
Reproducible with: 2021.3.37f1, 2022.3.26f1, 2023.2.19f1, 6000.0.0b16
Reproducible on: Windows 11
Not reproducible on: No other environment tested