When it happened the second time, I never left the ignition on and got out while my truck was in park. I took it to the dealership and they were perplexed. They fooled around with the shift lever and said what I already knew, “Physically, I feel it shifting into park, but the computer isn’t reading it.”
They worked on it and things were fine for only a few weeks.