The only time I've ever had this problem was a trip to the beach, the radio (ken wood was installed, but this could even happen with stock headunit) cut off and instantly back on, even once loosing the memory of stations and settings (when this happened my car chirped like it it lost all power). The only thing that would really cause that would be you loosing 12v constant to the radio. My best guess would be connection issue, now where it's coming from is the other question. I'd start the trouble shoot by
1. Inspect relating fuses of the radio and also the postive and ground terminal of the battery, also checking the ending of the wiring that connects to the terminal. If the wiring of either is weak, damaged, or easily breaking apart then trim back the wiring and get a new set a connectors. A loose connector is likely the most common problem of your symptoms.
2. Clean the positive terminal of the battery, and also the connector of the wiring to the terminal. Make sure they are both tight and have a good connection.
3. Drive the car like you normally do, if the problem persist, dig deeper.
4. Pull the head unit and inspect the 12v constant wire (normally yellow), the 12v power wire (normally red) and the ground wire (normally black) of the wiring harness adapter that spliced into the wires that run into the back of your head unit. Make sure the wiring isn't bad or falling apart, that no wires are showing and touching anything.
If none of this fixes your problem, then I'm at a lost. I'm no expert mechanic but this would be my best guess as to how to go about fixing the issue. I'm sure the more knowledgable Mustang electrical veterans of the forum will chip in and give you instructions of what to try next. Hope this helps you out in some way and solves the problem!