Facebook is like a shopping mall; they're public spaces, but you're not allowed to put up any unapproved signs in them, and they can kick you out for violating their policies.
The mall operator can be held liable for publishing racist graffiti? If they choose not to paint over it, do they lose a defence they didn't spray paint it? What if they also sold the paint used to do it, inside the mall?
From a US perspective I suspect you'd say "no liability" but outside the US things are more complicated. There's specific law in Germany about hate crime. I don't think it's a given there is no legal risk for Facebook or Google here.
It's kind of interesting because you could still walk by the mall if you were kicked out, looking in through the windows longing for the aroma of that giant Cinnabon just one more time. Similarly you could visit Facebook's login screen but would not be allowed to enter any more. I doubt Facebook smells quite the same in the inside, anyway.
However the government does allow political signage in public places and has laws preventing others from removing them. However if said signage is considered by the local government to be inappropriate then it is removed. So how is a social media platform different than that public arena?
The problem I've seen is that places like Facebook and Twitter have moderation that is clearly biased. The Hunter Biden laptop story is a perfect example...they restricted the sharing of the NYP story despite no evidence that the article had any misinformation in it (still a factual story). This is no different than if you had political signage on your property and the government built a wall right outside your property to block anyone from seeing it. Are they restricting your 1A rights...technically no, but realistically yes.