The red and light green wire (pin 11 and 12...the splice together down the line) goes from your switch to your ignition module (pin 1). It gives 12V through the ignition switch to the ignition module. When the module gets power from this wire it fires your plugs. When no power it should turn off your coils. This is an assumption based on the diagrams I've seen.
I would assume that the switch is making bad connections and isn't interrupting this wires power to your ignition module when you turn the key off.
Next time it doesn't turn off and check this wire and see if power is still going to the ignition module.
I just reread your post and I would most likely assume that your ignition switch is bad.
It doesn't say in my diagrams which wire is the supply line (I would assume Light Green, probably multiple ones). Any way there should be a wire or wires that have power no matter what and those should be the power ones.
Now for the "load" wires here is the ones that should have power at the certain positions:
Grey/Yellow (2 of those)
Pink (should be two pink wires on one pin)
Purple/Yellow are grounded during start and so is the solid Grey ( I don't think you would have to check these).
Ok so I found this from a 92 Ranger Diagram:
You could probably take the ignition switch out and test resistances across the pins.
When in the run position should have continuity between the Light Green pins and:
In the Start position between light green and
NOTE you will have to move the slider lever to the right position.