Radio turns off and wipes memory when headlights turn on

1989 Dodge Ram D100

It has the factory radio. The truck has 45k miles. Extremely clean truck. Nothing looks messed with under the dash, not even dust in there.
It works fine but as soon as I turn on the headlights, it turns off and wipes the memory. I turn off the headlights and it’s back on. The time resets to 1200 and it goes to the first AM station. I checked all the fuses. Nothing missing, broken, and all amps are correct. Could it be a bad ground? Where would I begin to look? Anyone else have a similar problem with a different car maybe?
Author: JcLeiva