Banana bread and zucchini bread are notorious for this. It's because the internal temperature of your bread was not quite high enough or hot enough to fully set the loaf. Upon cooling, it will fall. Ensure against this by baking long enough! Once you pull it out of the oven and 15 minutes later you notice it's falling, you can't put it back in the oven! Not only will it NOT correct the cosmetic issue of a fallen loaf, but the loaf is likely still unsafe to eat with the raw eggs in it that have NOT been fully and thoroughly cooked, and you will need to throw the bread out.