I think America/Europe would've gone through a similar phenomenon were it not for immigration. Immigration presents a significant challenge to the culture, but it's a necessity to keep evolving the economy and make sure your population/ideas don't stagnate.
I'm from Japan, and I think Japan would've potentially kept it's second place in GDP ranking if they were more aggressive with opening up the country to immigrants and creating a narrative for what it means to be Japanese outside of blood and heritage.
Why care about nominal GDP though? More important how the economy does per capita and Japan seems to have held its wealth over time, there's almost no change¹ since the 90s. Economically and development wise, Japan has done remarkably well.
Mass immigration is a big gamble, with problems societies might not foresee and that only manifest many years later. It worked more or less well in a place like Canada, but for a counter example look at Western Europe, they messed it up.
What do you mean? The EU is the third largest GDP and half of the GDP is just comprised of France, Germany, and Italy all of which has a dwindling native population, and its growth propelled by easy immigration within the EU.
I'm from Japan, and I think Japan would've potentially kept it's second place in GDP ranking if they were more aggressive with opening up the country to immigrants and creating a narrative for what it means to be Japanese outside of blood and heritage.