I’m not sure you can record all your button presses etc and recreate a performance via midi - I could be wrong though.

Having said that, practice more, hit the record button the second time around instead of the first, or redo parts and edit them in.

There are more than one way to solve this problem.