Some manufacturers have thought of this scenario and include an on/off switch for the parking sensors. However, this could be anywhere on your car from behind the wheel to on the multimedia display, so the best bet is to have a look through your car’s manual and see if and where the switch may be. Alternatively, you can retro-fit a manual switch for the parking sensors. Check whether your manufacturer recommends this. whether it will invalidate the warranty and where it should go. Pickups can often have the switch installed in the rear load area, which can be quite convenient.
The third option is to use a small relay to prevent the parking sensors from activating whilst towing. There’s a device called a “fog light cut off relay”, which is a relay with a small piece of circuitry built in that senses when the trailer fog lights are connected and cuts off the car fog lights to prevent glare. This same piece of kit if fitted between the reversing light feed to the reverse park sensor and the feed to PIN 1 (caravan reversing light) on the 12S socket has the same effect. When the 12S socket is connected it senses the caravans reversing lights and cuts the power to the reverse park sensors. Disconnect the caravan and the sensors work again. These cost ~£5 to buy and take ~30 minutes to fit.