I'm assuming this is a key-start truck? Possibly a problem in the ignition switch that's sending voltage to the solenoid during turn-off. You could check it with a trouble light on the starter solenoid terminal that comes from the switch, if you see a momentary light during shut-down, you've got a problem in the switch or something is wired wrong.