Skenande byggkostnader och snabbt stigande räntor har lett till ett ras i bostadsbyggandet.