If the old petcock was not shutting off the fuel flow replacing it was fine, but there's a second problem that is sounds like was not addressed. If the carbs were overflowing there is also a problem with the carbs.
Even if the petcock is letting fuel flow from the tank the float valves inside the carbs should stop the fuel flow once the correct fuel level is reached inside the carb bowls. I suggest you check and clean the float valves. A q-tip and carb cleaner should make them squeaky clean. Do not use anything abrasive. With the float valves cleaned they should no longer leak. To prevent a re-occurrence a quality inline fuel filter should be installed between the fuel tank and carbs.
The other thing to do is the clear tube test to determine and, if necessary, set the fuel level in the bowls. If the fuel level is set too high fuel will overflow. The test involves attaching one end of a clear piece of flexible tubing to the carb drain hole and holding the other end of the tube above the bowl/carb joint. When the fuel is turned on it should rise in the tube to a level 2.5 - 4.5 mm below the bowl/carb joint. If the fuel rises higher than that level it may run into the cylinders or over the upper end of the brass overflow tube inside the carb bowl. This condition is corrected by removing the float and gently bending the tang to raise the float valve needle position. Doing this may take several tries before achieving the desired fuel level.
Ed