Poor Undo Performance: Blender 2.9
If you encounter any problem toward Undo system, please help to file up that bug to the bug tracker in Blender develop. There is a new undo/redo system been adopted due to the old one was bulky in some situation.

A quick way to fix your strange behavior is to use old system instead of new one:
By checking Developer Extras in Preference-

And choose Experiment panel and check undo legacy