2006 Chevy Silverado 3500 (crew cab dually) with Duramax diesel and Allison transmission. Every time transmission is shifted into Park while the engine is running, the engine will shut off. The engine is able to restart, but this has never happened before.
The problem might be with the Transmission Range Switch.
The TRS informs the computer what gear the transmission is in. Turns on the back-up lights, prevents the engine from starting unless in park/neutral,
If the problem occurs with the operation of the shifter, I’d look at the TRS.