Blender Version
Broken: 3.0
Short description of error
Material slots undo is inconsistent. Sometimes multiple slots are added/removed in one undo, and sometimes undo won't change back mode.
Exact steps for others to reproduce the error
tab to edit mode
add a material slot
undo twice
add another material slot
undo
both material slots will be undone. Also undo won't go back into edit mode.
if you redo both material slots are redone at the same time.