I don't think that's true. The vaccine still reduces the likelihood that you'll be infected so only allowing vaccinated visitors reduces the risk that COVID enters a hospital through visitors. I think the vaccine also reduces the likelihood that people with breakthrough infections infect other people