I did some searching, and this is something that YJs occasionally do. No one had a solution, but the possibilities mentioned were something sticking in the steering column, ERG valve or EGR sensor, and the ASD (automatic shut down) relay. Since you've replaced the relay itself, looking at the circuit I'd say it has to be that the computer isn't sending the shut down signal to the ASD relay when the key is turned off. Here's one way to check that:
The computer keeps the rig running by supplying the ground for the coil side of both the fuel pump and ADS relays. When you turn the key off, it disconnects that ground, shutting off both relays at the same time. The wire that accomplishes this runs between the PCM (computer) and the power distribution box (by the battery), and is
dark blue with a yellow stripe.
The easiest place to get at that wire will probably be the connector at the PCM, which is mounted low on the firewall on the driver's side. Hook up a test light to the positive terminal of your battery, and with the rig running, probe the connector at the end of that wire.
Note: Be sure to get the correct wire! Your test light should light up. Have someone turn the ignition off. Your test light should go out immediately. If it doesn't, then keep the test light there and confirm that there's a correlation between the light going out and the rig shutting down. Once you know that the PCM is or isn't shutting down the ASD and fuel pump relays we can figure out where to look next. If the computer is keeping the rig running after the key is off, it's either not getting the message (sticky ignition switch?) or it is getting the message but not acting on it (sticky computer).