Exactly what Ken said
Turn off the ignition when coupling and most systems will read the ABS / EBS correctly.
We had this problem with some of the older trailers at GBE but the newer ones or the ones fitted with discs never seemed to have the problem