Fuel gauge not working when mounted to the dash
Most clusters MUST be grounded for all the lights and gauges to work properly.
Infact you can burn out your gauges with out the ground. The IVR MUST be grounded to function and without that ground it provides a full 12v to the gauges.
The lamp lighting suggests it is completing a cir somewhere
That your gauge works when un grounded is most likely a fluke.
Might be a bad connection when the wires are under tension