The simplest way to get you want is just use save option. Each time player make a change, system will trigger saving action into an iteration name like "save1", "save2", etc, adding 1 into a variable value. To move back & forth between changes, my undo-redo example did that exactly. You just need to replace the x or y value into save slot then load them when needed.
So make sure you make entire save-trigger system record every changes made by player and only at certain condition such as ' isn't touching object, trigger once'.