Collective code ownership is a prerequisite to most Agile processes for this very reason.
Different code bases in the org might even have different process certifications they have to follow, eg in medical software or some other industries. In those cases it’s downright impossible/illegal to give every team access to every repo.
SAFe is supposed to solve this. I haven’t heard anything good come out of it though so far, so I find this thread very interesting.