Thats why in aviation we calculate in "pounds" of fuel not gallons.
Isn't fuel weight used in aircraft more for weight and balance?