I'm assuming your truck has the factory ; built in ; trailer brake controller.
I'll look to see if I can find any info on how it monitors the trailer connection to generate the , disconnected message.
I'll wager a guess that your problem is under the RV in the wiring to the axles, air flow under the trailer could be shifting the wiring around , causing a temporary open circuit.
99DSDP 3884, Freightliner, XC, CAT 3126B, 300 HP /ALLISON 3060
2000 Caravan toad, Remco & Blue Ox.