That presumes Google is paying Mozilla primarily to secure the search market. But if they're paying primarily to secure staying out of anti-trust court, Firefox culling ads doesn't affect whether big G keeps their wallet open.
Do you need $500m/year to maintain a web browser? Cut all the dead weight, rebuild trust, and you could probably do just as well on donations. For one, I'd be donating to Firefox every month, if there were such a fund ringfenced only for Firefox development.
They're not getting that money for the ads. They're getting it to be a decoy for anti-trust investigators. Which is not hampered in the slightest by adding a default adblocker.