The easiest way around that is to structure the zoning code so that mixed-use buildings with ground floor commercial space and residential units above is given favorable treatment over stand-alone apartment buildings.
Sure. Then the ground floor remains empty for years. Real world experience with this.