2007 Silverado tail lights turn on and off while parked

It is very likely the trouble is coming from the brake light switch. You would be wise to invest in a test light probe so you could verify that by using it to see if the switched side of the light switch has power on it. I can’t think of anything else that would allow power to get to the lights except the emergency flashers. The middle brake light would not turn on in that case.