Are you saying you measured the sender resistance with that amount of fuel in the tank and it is 40 ohms? That is not correct.
Here is an aftermarket copy of the factory gauge tester. It is nothing more than a 3 position switch with 3 resistors, added by someone else in yellow. That is empty, 1/2, and full scale for either temp, fuel, or oil (rally) gauges
With about 1/2 tank of fuel, then, you should show somewhere in the range of 23 ohms
Does your temp gauge work OK? That would indicate the IVR is working
There are several problems that can occur with gauges.........
1--Power is fed to the cluster so the pin at the connector could be loose/ corroded
2--(As mentioned, the senders must be grounded AND THE CLUSTER must be grounded. The were originally grounded through the mounting screws,----a poor deal---add a ground pigtail to the cluster and bolt to the dash column mount)
3--The IVR can be bad/ out of calibration. Again if the temp gauge works............
4--The IVR contacts "socket" in the PC board can be not making contact with the PC board traces
5--The studs/ nuts on the gauge connections might be loose at the pc board and not making contact
6--The gauge itself might be out of cal or have other problems
7--There might be a bad connection in the wiring harness. The gauge sender wire goes through the left kickpanel connector (on the way to the rear) as well as the sender connector could be loosed/ corroded/ intermittent
8--I know you say you checked, but just to be complete, the sender might not be grounded or MIGHT HAVE AN INTERMITTENT ground