You drove and pulled up to the gas station to fill your gas tank. You exited your vehicle, opened your gas tank cover, grabbed and put the dispenser nozzle in. You also had to pay at some point.
How can you forget that the hose is still connected to your car when you drive off?
It has nothing to do with when or how you pay.
It’s all about the lock that lets you leave the nozzle pumping while you go do something else. That’s what makes it easy to forget you have the nozzle in your car, since you’re not holding it for the entire filling process.