Looks like at the moment every variable change (while changing) is saved as an undo state. From my experience it is enough to save after the changing (mouse release) has happened, so there will be only one undo step back to the value as it was before starting to change.
Additionally it seems like an intermittent step of deletion is stored (menu says "Undo deletion") causing a strange glitch when stepping back.

Looks like at the moment every variable change (while changing) is saved as an undo state. From my experience it is enough to save after the changing (mouse release) has happened, so there will be only one undo step back to the value as it was before starting to change.
Additionally it seems like an intermittent step of deletion is stored (menu says "Undo deletion") causing a strange glitch when stepping back.