Vaccinated people are significantly less likely to become infected, and once they do get infected, they are less infectious (see recent study results summarized at
https://www.newscientist.com/article/2294250-how-much-less-l...).
It's the dramatically reduced overall transmission rate among the vaccinated that confers the benefit of restricting unvaccinated people in public spaces.