Inconsistent undo behavior when making a compound shape with a clipping mask
I understand this may not be as common a use-case, but while trying to figure something out, I was puzzled when undo did not return to the state I was expecting. Below are the steps to reproduce this issue:
Create a shape, such as a rectangle. Give it a color.
Create a different shape and place it somewhere overlapping the first shape. Give it a different color.
Select both shapes and create a Clipping Mask by right-clicking and selecting "Make Clipping Mask"
You should now see only the overlapping parts of both shapes, as expected.
Open the Pathfinder panel and click on the menu icon and choose "Make Compound Shape".
The outlines of both shapes should be visible.
Undo, and the overlapped clipped shape step is skipped and instead, only the first shape is colored and the selection is a group, which was never made.
Undo again and the second shape is colored.
I'm not sure what the expected result should be. Maybe as if they were never clipped at all? To be honest, I was looking for something like the Merge function, without creating empty fill shapes. This doesn't do anything like that though.
It looks like instead of making a Clipping Mask on redo, it's just grouping? I've provided a video.
My system is Windows 10, 20H2, 19042.1165.
Illustrator version is 25.4.1