This is a common fallacy.
Builders do tend to build more expensive homes because there is more profit in it. And in many areas there are zoning restrictions such as minimum lot sizes, setbacks, minimum square foot requirements and so for that prevent them from building more economical forms of housing such as blocks of modest row houses. So if you are a builder and you have a 5 acre subdivision with minimum lot sizes of 1/4 acre in the zoning code then you can only build 20 homes maximum. The only way to earn more money on that subdivision is to build bigger homes on each lot.
But think about it for a minute. If are living in a community where there is demand for $1 million homes and none are getting built, then those people who have $1 million to spend and want housing will still buy homes. They will just buy $700,000 homes and spend the extra cash on remodeling or improvements. And then those for whom the $700,000 homes were a stretch who got outbid by the $1 million buyers will just be forced to drop down and buy homes in the $500,000 price range instead, and out-bid buyers in that price point. And the buyers who might previously have bought the $500,000 homes are now shopping homes that were previously $400,000. Rinse and repeat. Housing markets in any given location are interconnected.
Restricting construction at the high end of the market doesn't make those buyers go away. It just means they start shopping further down the price scale where they will have the means to outbid anyone shopping for more modest homes.