Collapsing can occur if the dough is over-proofed. Let the bread rise only until it’s just about the top of the pan. Make sure your oven is properly preheated and try to open the oven door sparingly to avoid temperature drops that could cause the bread to fall.