What causes gas to move from one tank to another by itself? on 1997 Ford F-250

The back tank drains into the front tank while I'm driving and when the front tank gets full it sprays out when I take a turn or hit a bump in the road. Also, the fuel in the front tank rarely runs the truck. Usually when I flip the switch to change tanks it sputters and conks out. It seems to work more often when I start the truck on the front tank.

Asked by for the 1997 Ford F-250
Switching valve problem, can block it and just use the rear tank or have it repaired.