You're ignoring land use. You can't build a huge conventional farm in the middle of the city. You can, however, cover all the buildings with solar panels. This gives you land that supports a high population and grows food in the same place. Heck, since you're using LEDs you could put the vertical farms underground, giving every resident access to fresh vegetables right in their own building.