I can not think of a failure scenario that would smoke the diode, but still allow the engine to run and shut down when the key is turned to OFF. If it isn't wiring damage, it would have to be a faulty (somehow) IDM or PCM relay.
Substitute both the IDM and PCM under hood relays with 2 relays removed from the under-dash fuse box. If the diode still pops, you haven't found it. If you start popping a fuse for a non-critical system (Horn, Driver window fast-down, or Power Window / Radio) then that is the "bad" relay from under the hood. Relays are cheap, but test by substitution is even cheaper.
EDIT: Because this is intermittent, I would try the relay substitution above first. Because the ABS light staying on is associated with the diode pop, do this:
When you shut it down, watch the ABS light. If the light comes on, IMMEDIATELY turn the key back to RUN. (If you're quick enough, the diode should still be intact.) (If the diode does stay intact, it is "reverse current" overload that is smoking the diode).
Go under the the hood and remove the diode. Does the engine stop running? (It should not stop if the fault is present).
If the engine stays running with the diode removed, remove the PCM relay. Did the engine stop? If = NO, remove the IDM relay. (That better stop it).