I'm a learner, but I'm pretty sure it is not supposed to work like this. First off, I'm on Windows 11 using the most updated version of AE. To the best of my knowledge, the settings in my AE are the default, "fresh out of the oven" AE settings. The issue: I had made a simple track matte animation and was exploring with the pre-comp feature. The animation itself was a very simple move-from-position-A-to-position-B animation and there was a matte applied to it so that it would appear to scroll into a selected region. Now, I had precomposed this and selected a region of interest in the new precomp. After deciding I didn't like the region I had selected, I hit ctrl+Z. That undid the animation though, not the last action performed that was the selected region of interest. I can fiddle around with this and get back to the original state it was in, but is this how it's supposed to work? I guess I could see it, but it seems rather incovenient.
Thanks for making this report. @Mylenium is correct in saying that changes to the Region of Interest are not currently undoable actions. This is the original design, but being able to undo those "ephemeral" actions is a good feature request. To that end, I've moved your post into the Ideas section so we can better gauge other customers' interest and the impact this improvement would have on After Effects.