Another possible reason, if the wiring
is ok, is that your compressor is at the upper limit of operation due to dirt or age.
At the marina, when things are calm and your charger
DC power is at its best, it still works.
But underway, with motion and variable DC, resistance builds up and it cycles off.
Clean it/ test it with batteries only at the dock
and measure the amount of amps it draws when it cycles on, so as to confirm with Danfoss specs if resistance is too high
Also, how old are your batteries?