2009 Chevrolet Traverse won't start after a short trip

I own a 2009 Traverse bought it used when the car heats up if I run into a store for a short time it sometimes won’t start up again, I have to have it sit for about 15 to 20 minutes. It won’t take a jump either anyone else have this issue

The next time it won’t start, with the dash lights on, step on the brake pedal and shift the transmission into neutral and then try starting the engine.

If the engine starts, the problem points to the transmission range switch.

https://www.rockauto.com/en/catalog/chevrolet,2009,traverse,3.6l+v6,1444048,electrical-switch+&+relay,neutral+safety+switch+/+range+sensor,4584

Tester