Hezek re'iyah indeed includes laws preventing one neighbor from adding to his house in a way that it now allows him to view his neighbor's property. The classical case is to prevent a neighbor from building a window that allows him to see his neighbor's yard or window. A priori that would prevent the construction discussed in your question.
However poskim are divided on how to apply these laws to modern times. For instance, the fact we now have hallways behind doors and don't typically leave our doors open makes it less damaging to have a door open across from your door. Similarly, we often have blinds and curtains in front of windows making windows across our windows less damaging. Last, municipal zoning laws are often taken into account to halachically allow what common city customs allow.
As dinonline writes (here, bottom of p. 5)
Nonetheless, Batei Din today generally apply the basic principles of
hezek reiyah in cases that are brought before them. Municipal
permission to build a house or an extension, and the question of
whether this permission was granted despite neighbors' objections, are
factors that Batei Din take into account (different Batei Din do this
to varying degrees).
Dayan Shmuel Honigwachs writes similarly here.
I also saw that R Asher Weiss brings up a number of times in Minchat Asher (vol 1, simanim 92ff) that Hilchot Schenim (the laws of neighbors) depend to a large extent on local customs, and what is typically allowed or expected locally.
These situations need to be brought to a beit din familiar with local customs, an example of a similar situation was brought to the beit din of Gush Etzion which ruled that a neighbor wanting to build a courtyard giving him a view into his neighbor had to share the costs of building a fence between their properties, despite the decision of the civil building authority authorizing the building.