Steps to reproduce:
1. Open the attached "IN-153473_DictionaryUndoIssues" project
2. Open the “TestScene1” scene
3. In the Hierarchy window, select the Test GameObject
4. In the Inspector, expand the Tiles and Visuals fields on the “Terrain Authoring Data” component
5. Right-click the “Terrain Authoring Data” component and select Simulate Paint
6. Right-click the “Terrain Authoring Data” component and select Simulate Erasure
7. Press Ctrl+Z to Undo
8. Observe that Tiles is still empty and Visuals has one entry in the Inspector
9. Press Ctrl+Z to Undo
10. Observe that Tiles is empty and Visuals has one entry with a missing GameObject in the Inspector
11. Press Ctrl+Y to Redo
12. Observe that both Tiles and Visuals have one entry in the Inspector
13. Press Ctrl+Y to Redo
14. Observe the “Terrain Authoring Data” component
Actual result: The Tiles dictionary has one entry and the Visuals dictionary has no entries in the Inspector
Expected result: Both dictionaries have the correct state after undo redo operations
Reproducible with: 6000.6.0a7, 6000.6.1f1, 6000.7.0a6
Could not test with: 6000.0.83f1, 6000.3.24f1 (Dictionary Serialization is not supported), 6000.6.0a6 (Dictionary Serialization was added in 6000.6.0a7)
Reproducible on: Windows 11 Pro (25H2)
Not reproducible on: No other environments tested