I power my trim gauge with "running" 12 volts, is it possible you run accessory power on shore where it works, and somehow missing power when in the water? The trim gauge and sender are a fairly simple circuit, the sender being somewhat similar to a volume control. Why it works on shore, but not in the water is a tough one to troubleshoot