With around 6,300 people per km2, "it is similar in terms of population density to San Francisco. In Tokyo’s 23 wards, however, the density is 15,381 people per km2, making it 50% higher than New York City as a whole."
My comment was more about the parent comment's poor comparison between SF and Tokyo by using Tokyo Metropolis (Tokyo-to) population density – which includes large areas of rural land and mountains – instead of the 23 Wards which is still not perfect but a better approximation of the "city" part of Tokyo Metropolis.
I agree that the link's comparison of Tokyo 23 Wards with all of NYC is not an appropriate comparison. But not necessarily because of single-family housing as you describe. Even for Nakano Ward (with population density nearing Manhattan's), 20.8% of residential buildings are detatched single-family homes and 48.9% of residential buildings are less than 3 stories tall [0], surely a higher proportion than several NYC boroughs. Its high density is more due to having fewer areas with offices, narrower streets (compared to NYC), and barely any green space.
https://japanpropertycentral.com/2021/12/housing-in-tokyo-is...
The 23 wards of Tokyo are 5 times the land area of SF city proper.