The secret is for the government to make up for the decrease in private supply. Vienna showed how it's done - see this article for example: https://citymonitor.ai/environment/housing/red-vienna-how-au... There's a reason it's been #1 most livable city in the world on several rankings for years in a row now.
You need to have some residency control for that to work. Otherwise, everyone would just flock to the most popular cities for their discounted apartment. This also works in Singapore, but only for qualified residents.