The cars radio needs 3 wires to turn on. constant power from the battery, ground and power from the ignition. the ignition wire is what tells the radio to turn on and off but the radio is actually always on!
thats how it keeps all your settings, you may have noticed that if your car battery dies, you have to reset the clock and any other electronic settings.
It seems that the power ignition wire is staying on longer than it should and then ending. power on this circuit is usually controlled by the key, which switches a relay, which then connects the 12v ign wire to the 12v constant wire, giving you 12v on both the constant line and the switched line and the radio turns on. it seems there is a delay in switching off of the relay.
This is assuming the radio isn't defective, it could just be broken. one way to test it is to take it out and test each of the wires. google the aftermarket radio color code and it will tell you what wires are what. then connect a jumper cable from the battery to the radio's three wires. black(ground) to battery neg and red(constant?) and yellow(switched?) to battery pos and then disconnect the battery from the ign wire of the radio (cant remember if red or yellow, google knows) and see if the radio does the same thing it did in the car, then you know if the radio is at fault.
If the stereo passes the test, I'm thinking maybe the radios wires are both connected to the constant power wire and there is a turn off relay or something wierd in the car that shuts off the power to that accessory so the battery is not drained.
After a long rambled reply, this is my best guess because it would be the easiest thing to get backwards : the constant and switched wires are connected in the wrong sockets, just switch the two and it should work...
I'm 70% sure this is what is wrong but feel free to send me an email through yahoo
Rate 5 star plz :)
Best of luck