In your opinion what advantages would be had in going for a 76mm main gun over a 57mm one
Not much. The 76mm I believe we have some in storage of older models from the FFG's and some logistics for it. Its a bigger, heavier gun. Has some advantage for shore bombardment against hardened targets. We have seen many modern navies move away from the 76mm and fit 57mm guns, which typically shoot faster, carry more rounds, faster to target etc. As pointed out the Type 31, the constellations are going with the 57mm and they are pretty serious warships. The 57mm is pretty much in the sweet spot for range, altitude, accuracy, explosive power etc. I also don't believe our OPV are designed for the 76mm you need to move to the opV85 for that type of capability..
Which again raises the issue of 40mm on a ship, what does it get you, particularly if the ship is designed around a 57mm main mount? I can see value in the 40mm as a CIWS or secondary gun, where its lightness, and superiority over 20-30mm is going to be significant.
Is the smaller footprint and weight difference that important? Probably not. If cost, integration, proven, commonality, capability are all negative? Do we want to be the prototyping donkey for an orphan European weapon system? On our cheap and cheerful low cost, slow OPV? I get why we were interested, saving nearly 10 tons and having a neat little gun. But I don't see any must have capabilities, and costs are likely to be greater. IMO seems perhaps a better fit for a secondary guns on a bigger platform.
57mm is going to be quite good against things like high flying drones, low flying drones, loiter munitions and is able to strike out to basically horizon level etc. While warship on warship engagement for a OPV is unlikely, warship on drone is very likely. Given its OPV role, that is probably an area where it is valuable to have the extra punch of the 57mm. The drone threat is a real thing now, as seen in the Ukraine. Not just by large powers, but basically any power. In terms of kinetics and hitting, the 57mm a proven thing, and the 40mm came and went as an antiair caliber. It lack range, engagement envelopes are small and tight, it can't match the 57 for throw or punch or total explosive per second.
Why do we need to save weight on the OPV? The design can take the 57mm and still have weight for other weapon systems. If we fit the 40mm are we just fitting ballast instead? Then facing further integration costs. Who else is using it? With the 57mm we can embark some friendly's for training, and there are cheaper older 57mm mounts that may be of interest to PNG/Timor/Fiji etc.
Put it this way, if we ended up with the 57mm, I don't think anyone would be disappointed. We would be bringing a system that all our allies are operating or intending to operate. If we go with the 40mm Leonardo, we are all on our own in terms of integration, support, logistics, crewing, training, improvements, development etc.