Sometimes my car won't start in park but will start in neutral. Why? on 2009 Mazda Mazda5

Sometimes it will start in park and later it won't unless I put it in neutral

Asked by for the 2009 Mazda Mazda5
Park/neutral switch defective, loose or needs adjusting. Backup lights work when shifted into reverse?
Yes my backup lights work fine.
what was your fix?