Illustrator forgets to undo the document color mode switch
Here’s a simple test.
1. Create and RGB-based document — the title says 'RGB'
2. Draw something
3. Change the color mode of the document into CMYK — the tab’s title changes accordingly (notice the History displays the generic 'Undo' instead of expected 'Document color mode CMYK')
4. Draw something else again
5. Start undoing steps, either with Cmd/Ctrl+Z or with the History panel. When you reach up the first object drawn, the tab’s title should display RGB — but it still says CMYK! ...and if you hover over the title, the hint appears saying it’s RGB (or not!) ...and if you draw something after this, it stays CMYK now. Ai forgets the document was an RGB one and never undoes it!
If I try this in an older version, without History in it, like CC2017 — it works as expected.