I’ve had to chase this problem myself. If the gauge itself is good and wiring to sending unit tests ok, then options may come down to clean (clean !) ground to tank itself or gas-logged cork or plastic float (they leak). The electro-mechanical aspects of the sending unit are pretty simple and not very prone to failure - the float itself, unless soldered brass, not so much.
Please let us know what you find