'03 Overland Grand Cherokee. Rear brake light goes out when brakes depressed but ONLY when headlights are turned on. Garage fixed it once but jumped over how they did it, maybe just replaced bulb, for $60.00! (Does it take a 3 way?) Returned to misbehaving about 2 months after the fix.
I've had the same issue a couple of times and it's very common with WJs. I took out the whole light assembly , clean out the sockets and the contacts. Then with a flat blade screw driver I just pulled up the contacts a bit so they stuck out a little be more. Be careful not to break them. It is the warping issue with time because of the heat of the light bulbs. You can also try just switch the sockets around with the other tail light. Seems like they warp differently and just by switching them the make better contact on the other side.
I've had the same issue a couple of times and it's very common with WJs. I tried the bend the contact up and it worked for a while but with lights on the brake lights only work sometimes. It is my understanding that their is a printed board in the light housing and over time they short out. When the power is released to the brake lights its shorts out the circuit. I had to replace the housings…… you can find them online under a hundred and pair you will save in the long run as I have two tickets because of this issue