After initiating a build of a unit, clicking on the map does not exit the cities - unit build menu.
The only way out is to select something else on the map (unit or city) to break the lock. I assume that is a bug?
Usually clicking somewhere on the map gets you out of the city menus.
playing [.915]