We had all new fuel injectors put in.Probably something with the fuel injection. When you turn the key off it cuts the fuel off. No fuel, no dieseling. Leaky injectors?
It's funny that since it's a new engine it does this. Dieseling requires a hot spot (carbon) in the cylinder for ignition. Maybe some Seafoam?