How to reproduce:
1. Create a new Unity project
2. In the Hierarchy, right-click -> 3D Object -> Terrain
3. With the Terrain GameObject selected, in the Inspector, Paint Terrain -> Paint Texture -> Edit Terrain Layers -> Create Layer
4. Expant the Terrain Layer settings and make any changes
5. Press "Ctrl + Z"/"Command + Z" to undo and observe the results
Expected results: The changes on the Terrain Layer are undone
Actual results: The changes on the Terrain Layer are not undone
Reproducible with: 6000.0.68f1, 6000.3.9f1, 6000.4.0b9, 6000.5.0a7
Reproducible on: macOS Tahoe 26 (M1)
Not reproducible on: No other environment tested