you fact about New York city actually supports (not against) my argument. The high density is exactly why an apartment in NY city is worth millions of dollars! That’s my point: when developable land become more scarce, that will generate a stronger support to the housing price.
The land scarcity is also the reason why the housing in tokyo is much more expensive than other capital in the world.