This plugin will keep track of the player's and events' movements and undo them. If you want it triggered by a a different keyboard key or button than the default selections you will need to use it with another plugin like Eli Button Common Events. I will not be adding any more features. There apparently is
another plugin by Gimmer that will also undo switches and variables, but doesn't work with diagonal movement, mine does.
Free for commercial or non-commercial use with credit to AquaEcho
Undo Player and Event Movement
aquaecho.itch.io
Free for commercial or non-commercial use with credit to AquaEcho RPG Maker MV/MZ - Rewind Time Undo Map Movement by AquaEcho Undo Player and Event Movement aquaecho.itch.io