Pretty much, most fuel tank senders are various kinds of float style, where the position of the float varies resistance.
However, there’s this: Holley 19-250 Easy Level™ Fuel Level sender that uses contactless lidar (laser imaging, detection, and ranging) for detecting fuel level.
Worth a shot to play with something like this in your shop…