The first thing I would look at is the power source for the CD player. Pull it out and put a volt meter aon the power feed to it and watch the voltage as you turn lights on. Some electronic equipment will shut themselves off if the feed voltage drops below 9 volts.
if this is the case find another way to feed the player directly from the fuse panel. Sounds like someone wire the player wrong.
WBCCI 12156 AIR 3144 WACHUNG TAC NJ6
2004 Excursion 4x4
1991 34 ft. Excella +220,000 miles, new laminated flooring, new upholstery, new 3200 lbs axles