Those blue leds are a major distraction at night, wish they had a dimmer switch.
Sure sounds like you've got a loose connection or short somewhere, causing the p2 to think a trailer is being connected and disconnected.
You said you replaced the cable from the truck to the back of the controller... There's what, 3 or 4 wires? Power, Brake Input, Brake Output and Ground, right? Loose ground would be my first guess.
I have not seen this problem on my P2, so I don't have any more detailed suggestions.
2013 KZ Sportsmen Classic 200, 20 ft TT
2020 RAM 1500, 5.7 4x4, 8 speed