To add a datapoint:
I used to live in a very nice neighborhood in Minneapolis, MN with my GF and a child. House was just under 1,000 sq ft with unfinished basement and attic (not included in the sq footage). We loved it there. Great neighborhood: I could walk to the grocery store, or bus and restaurants etc. It was within walking distance of Lake Harriet (beautiful lake/park with free music performances, etc) and close to many other lakes and parks. We were outside a lot.
But we moved to a 2X larger house in the suburbs on a half-acre lot behind a nature preserve. Why?
Pretty much the only reason was that our son was going to be old enough to start kindergarten soon and the local schools sucked.
Private school was an option, but we soon figured out that it was cheaper to move to a bigger house in the suburbs in a better school district than to keep living in the city and pay for private schools.
This is a common reason for parents to move out of very liveable cities. It's often much cheaper to move to the suburbs than pay for private schools, especially if you have 2 or 3 children. And with more and more businesses moving from city to suburban locations, it may even make your commute shorter (it did for both of us).
tl;dr: Improve public schools in cities and more parents will stay.