These steps needs to be done in a fast sequence using keyboard commands. I'm not sure which of these commands trigger the bug.
Steps to reproduce:
1. Assign a key to "Go to last locate position" key command.
2. Record something on a track (let's call it Track 1).
3. Select a new track (2).
4. Record midi.
7. Go to last locate position
8. Record again.
11. Go to last locate position.
12. Keep repeating until Track 1 is selected.
EXPECTED BEHAVIOUR: Undoing a recording should never select another track.
ACTUAL BEHAVIOUR: Randomly Undo selects a previously selected track. This totally breaks the workflow.
System: Macbook Pro 16", 64GB RAM, macOS Catalina 10.15.7.
Software Version: Logic Pro 10.6.2