I was about to ask in a comment as to where in the world you were, as there are a few factors that can play into this. However I spied packages in the background and with a bit of sleuthing deduced that you bought Allinsons products, probably from Tesco and were hence likely in the UK, so high altitude isn't likely to be one of your problems.
I bake pretty much all my bread in a bread machine, mostly because I was living somewhere where bread was terrible in taste and texture, but have continued since moving away from there.
I find that bread machine recipes tend to be a little off how the recipes work. This might be something as simple as different flour brands used or the fact that tests are done in controlled conditions in labs with stable temperature and humidity.
The problems that cause bread to collapse like this generally fall into 4 categories
- Too much water/too little flour
- Additive missing
- Too much yeast
- Machine timing issues
1 and 3 are fairly self explanatory. My first guess would be water:flour ratio. Too much water (or too little flour) results in dough that is too wet and ends up in a more open texture. Your recipe has a hydration of 70% (280/400 *100). This is at the upper end of what you would want to use in a bread machine. For comparison, I use a recipe that has 300 ml water with 480 ml flour (62.5%). As a general rule you want 60-65% water for an all-purpose loaf.
Too much yeast will cause the bread to rise too fast and become too open, leading to collapse. Your recipe looks like the right amount.
I have come across a problem, in countries where the flour is not bleached, that you need to add some "bread improver", which is just some vitamin C and a bit of soy lecithin. I surmise the following is happening, but have no certainty on this: Without the improver the dough tends to rise slowly once the yeast has used up the added/free sugars in the flour - so the second rise fails to work well, leaving the heating from the cooking expanding the few bubbles remaining after knock-down too much, so the bread then collapses. If you are buying "bread machine" specific yeast it may have added improver already (if the UK needs it). You can tell this is the case as it will look like a mix of flour-like substance (improver) with small cylindrical granules (yeast). Plain yeast is a just the granules.
I find that bread machines (at least my one) don't knock down the dough properly or have a long second rise, which results in the upper part of the loaf being more open than I would like. I think this is a function of the timing of the rises, with the second rise being too long (or the element heating too slowly), so the loaves tend to rise, then collapse as there are too many bubbles in the dough.