I was surprised that building codes allowed such construction here in the UK as there’s lots of rules about sound insulation between units.
Think town square.
Sunlight could be dealt with by not enclosing all sides of the common area, have the south side be windows to the outside.
But in an enclosed courtyard, there would be apartments across the way at eye level. Though that's solved by scale. With a large enough complex, the courtyard distance isn't much different than apartments across the street.
They're likely much closer together than any opposing courtyard windows would be.
It's a bit different since you have two separate, not necessarily functionally or aesthetically compatible, structures. But that almost certainly makes it worse than if you were able to design opposing views simultaneously.
If it is formed of curved walls, it could be a nice place to put a solar-thermal plant.