I have a 06 jeep liberty and my left tail light goes in and out when i brake. Sometimes it will work sometime it wont.

I have a 2006 jeep liberty and im having a issue with my left tail light. When i brake it doesnt always light up, it goes in and out, sometimes it lights up sometimes it doenst. The light its self lights up when my lights are on it just doesnt get brighter like its suppose when i brake. I know its not the bulbs and im assuming its not the wiring because the whole light wouldn't work if that was the case correct? Im thinking it might be the brake switch from what i read. What do you think?

My car has 63000 miles.
My car has an automatic transmission.

– I have a 06 jeep liberty and my left tail light goes in and out when i brake. Sometimes it will work sometime it wont.