It's one of the reasons I am constantly arguing against people who want everyone to live in high density housing only.
When you have a bunch of abusive alcoholic parents living there who let their kids run rampant and bully the other kids, what then? Do you discipline their kids somehow? How do you get those parents in order?
It doesn't take much for that living situation to go from sounding like a big happy community to a nightmare.
And let's be honest, society is extremely hostile towards adults going anywhere near other people'a children nowadays, so how do you even intervene if your child has problems with another kid but their parents are neglectful and don't give a shit.
These sorts of apartments with shared spaces are common around the world. I'm sure they have some problems, but I wouldn't rule them out on the grounds that people might be horrible. And there are probably lots of people who would jump at the possibility of renting one of those places, assuming we build enough of them to make them cheap.
And there are lots of other options besides those. You can have denser, but family-oriented development like townhouses, with narrow streets that slow traffic. Lots of parks and places your kids can walk to. Front porches so that people are likely to be out and watching for trouble (which as I understand is known to be an effective way to reduce crime in an area).