I have baked a sandwich bread a couple of times and about half the time the bread doesn't rise enough on the second rising to clear the top of the loaf pan and comes out looking like a pound cake. It still tastes pretty good just not very tall. I use the same recipe, same ingredients, and technique. I don't have a nice mixer so I am bare handing the kneading. I am wondering if that is where the issue might be. I am trying to attach a pic of the end piece of last weekends batch and todays to show the diff. Where should I look for issues of the second rising height?
First, make sure your yeast is still good by adding it to blood warm water with a little sugar and let it sit for 20 minutes. If it's bubbling its good, if not buy new yeast.
Second, hand knead for up to 5 minutes, or until the outside of the dough is smooth. Over kneading can cause bread to have a tighter crumb.
Third, make sure you use atleast 70% the weight of flour in water. So 1000g of flour should have 700g (or ml) of water. Yes it makes sticky dough. No do not add more flour. Just wet your hands some to work with it. Also you can use warm water to mix in your bread. I prefer around 90 degrees F.
Fourth, bread flour can actually have too much gluten and make your bread dough over chewy with a tighter crumb. I prefer King Author All Purpose to make bread with. (The exception being if I want to boost the gluten content of a rye bread, then I use bread flour)
Specifically regarding your rising question, when you do your ferment (aka first rise) do not let it go too long. If you do it will collapse. Make sure you only go until it doubles in size. Now it's the important part, you want to shape your bread correctly. If you kneaded it correctly and did some stretches and folds during the ferment then it should have the gluten structure to be shaped as needed for your bake. The proofing phase (second rise) has one important step and that is not too let it over proof. As it rises again you will be able to stick your finger tip into the dough down to the first knuckle. If it springs back as you pull your finger out it needs to proof longer, if it doesn't spring back at all its over proofed. However if it springs back slowly then it is ready to be baked. The time your ferment or proof is complete is all based on temperature of the dough at the start, how hydrated the dough is, how much starting yeast you used, temperature in the room, and humidity. All of these things come into play, so if you write down some of these things when you make your bread you will better be able to judge when your ferments and proofs will be completed once you have enough data.
(Picture include is an example loaf I made)