sorry if this is a stupid question but that happens to the pressure of the water in the center of the tank?
The pressure is the same everywhere inside the water so long as it's the same depth. It isn't higher or lower based upon where the side of the tank is. Look at the formula. There isn't any variable that relates to the side of a container, wall, etc.
Think of the air on the earth (but ignore weather patterns.) It has very low pressure at 80,000 feet, low pressure at 5,000 feet and standard pressure at sea level. So, if you look at it that way, the pressure at sea level is much higher than at 80,000 feet. The air doesn't push "extra" against houses because houses have a wall. It's the same everywhere whether there is a wall or not.
That's because the nature of a gas is to equalizes itself equally inside a container. Liquids do exactly the same thing. The pressure in the ocean at 10 feet below is the same everywhere (except perhaps due to salinity) regardless of whether it's in the middle of the ocean, or next to a cliff or next to a ship.
So the formula doesn't need to calculate differently for each place because the only thing that matters is the depth. Water pressure in a tank at sea level at 20 inches down is the same no matter where in the tank you are, no matter how wide or long the tank is, no matter what type of tank it is.