That sounds very odd 😞
Only thing that comes to my mind is a faulty ignition key switch or wiring, or possibly power to the fuel pump as, once started, a diesel just keeps running until its fuel supply is cut off or it is starved of air. For it to switch itself of "cleanly" without any misfiring, as you are describing, suggests that either, there is a fault in the key circuit (it thinks you have turned the ignition off). or the fuel pump is losing power and cutting the fuel off.
Maybe you could try rummaging around the wires inside the steering column (when parked!) and see if you can replicate the problem?
Regards
John