Japan is hardly a great example. “Japanese Government Is Selling Houses for $500”, “There are more than 8 million empty homes in rural Japan”, “Housing stock in Japan. 62.41m”, “Vacancy rate of dwellings in Japan. 13.6%”.
It is pointless trying to compare a country with population growth against a country (like Japan) where housing availability is increasing due to population decline.
It has not had a decrease in population since 1995 and the latest data point (2020) shows an increase of +3.5% compared to 2015.
You can say the same about Germany (and probably most western countries) - vast rural (or depressed urban) areas are depopulating because people move to Berlin/Munich/Hamburg/Frankfurt/etc. And yet Japan solved affordable housing to a much greater extent than us.