Indeed. One of the chief causes of high land prices for farmland is unmet demand for housing in the urban core, so farm and ranch land gets bid up to development prices.
A lot of advocates of building restrictions did it in the name of preserving nature/farmland/greenspace, but in many ways it’s had the opposite effect: