auto shut off dumps gas on the side

I would first find out how big the gas tank is. Then (if the gas gauge is correct and assuming you have a 1/4 tank left) just stop shy and finish pumping slowly.
example (I don't know how big the gas tank is so these are just random numbers I'm using.)
full tank is 16 gallons, you gauge says you have 4 gallons left. I would pump 10 gallons and pump the last two slowly. That way you won't spill any.