There are a 3 things which will cause the gauge to be inaccurate in the tank even though it worked fine outside of the tank.
1) Float or arm is contacting the side of the tank somewhere along its up and down travel.
2) Float arm needs to be bent. If it reads empty with 2-3 gallons in the tank, bend it downward.
3) Float isn't buoyant enough to overcome the mechanical resistance of the rheostat assembly. These are aftermarket reproductions made who knows where.
How do I know all of this? I have had all of these happen to me, in addition to a leaky float in one case, and a replacement float which fit the arm, but lacked the volume to be buoyant enough to move the float/arm up and down in another.
I am the King of "something is wrong".
Carl