How do fuel tanks prevent free surface effect?
It's not from banking that makes fuel slosh around when the airplane makes normal coordinated turns, any more than your drink sloshes over the side of your glass, or falls off the tray during a turn.  The fuel doesn't know there's a turn going on.
It's from yawing motions that occur, to the extent that the yaw damper system allows it (very small yaw excursions), or more severely, in the initial moments following an engine failure where big yawing motions occur if the pilot is slow in correcting the asymmetric thrust, and perhaps during landing where yawing actions are done to align with the runway.
In any case, the fuel tanks are just sealed off areas of the wing box structure, with bulkheads formed by the ribs.  The bulkheads will have holes to allow fuel to migrate, so they act like baffles.  In some bulkheads, there may be little one-way flapper valves along the bottom to only allow the fuel to migrate inboard, so once an outer zone of the tank is empty, fuel can't slosh back into it.
At the inboard end of the typical wing tank is a &quot;collector tank&quot; that the engines actually draw from, which is continuously filled to overflowing (the overflow running back into the main tank or sometimes just overflowing an opening around the top within the main tank).  The filling of the collector tank is done by scavenge pumps installed at the tank extremities.