I was thinking about this too, and think it will come down to incentives for attackers and defenders.
Assuming offensive and defensive capabilities are similar, and incentives scale roughly with project size but start from a non-zero value for attackers, I'd expect larger open projects to be well defended by plenty of motivated people, and smaller ones less so (depending on maintainers). Closed source will mostly just depend on maintainers.
Also assuming closed source is less exposed to AI auditing overall, I'd guess large open projects end up more secure than large closed projects, but small open projects possibly less secure than small closed projects, since attackers might have more incentive to target them than defenders do to audit them.
Attackers are always far better resourced. You get six billion if you hack a crypto exchange, you get PIP if you spend time fixing bugs rather than pushing new features.