CHECK POOR CONTACT.
QUESTION

Is there poor contact in input signal circuit of the stop light switch?

Yes No

Repair the poor contact.

Replace the TCM.