https://www.familysearch.org/ does exactly this. Only information of people who are deceased is viewable outside the account of the person who entered the information.
It's run by the LDS Church, so there's a religious tone to their marketing. But you don't have to be a member or religious to use it.
I'm glad it exists, but I'm not super comfortable encouraging everybody in my extended family to give all of their information directly to the LDS Church, especially with their history of stuff like proxy baptisms of holocaust victims.
But on the other hand, I was just a minute ago wishing that this sort of service existed publicly as a Wikipedia-like free resource, which is a strict superset of the LDS Church having it, so maybe that's unfair.
It's run by the LDS Church, so there's a religious tone to their marketing. But you don't have to be a member or religious to use it.