I hope a simple mix up of the wires in the trailer socket, is all that problem turns out to be.
Not for discussion here but to say, if a diode that has been fitted into the head light circuit, then there is a possibility that the diode is biased on when the headlights are switched on, then a accidental reverse current flow in a wire could occur.
Then take that the rig to an authorised auto electrician, as those sorts of DIY induced faults, do step over the line of what is a fair topic to discuss on this forum IMHO.
see link for DRL
Diode Logic Gates
I could delve into this problem deeper, but without some hands on measurement giving some meaningful feedback, then it is all guess work with confusion the end result.

.
Bookmarks