There is actually a whole segment of Sports Medicine dedicated to this. When I was on the CU Freeride program a rep came in to talk about it. Its really interesting and factors in how your brain processes visual info under stress such as a dangerous line or comp setting and how the mismatch between your brain processing and your eyes can cause mistakes. Here is something similar, its actually really interesting:
https://www.actionsportphysio.com/en/health-tips/sports/sports-visual-training/
On a side note, I used to longboard a lot so I ride rails left foot forward but spin left naturally. It was actually easier for me to ride into some rails switch because then I would spin the right way for my feet.