The recipe looks fine. You don’t need the sugar or olive oil and I’d probably add another half teaspoon of salt for taste, but the recipe doesn’t look like the cause.
Knead it for longer in the mixer. Doesn’t matter what the instructions say, 2 minutes definitely isn’t long enough and a longer knead is always beneficial. Do 7-8 minutes minimum, preferably 10.
First rise for an hour sounds fine. Depends how warm your kitchen is. The longer you leave it at this point, the better the loaf tastes and the more active the yeast gets.
You can re-knead it in the mixer, but it would be better to scrape the dough out at this point and shape it into a loaf. Then, depending how warm your kitchen is, you need to leave it to pop back up for 30 mins or so before baking. Oven needs to be 230°C ie HOT.
Baking in a tin will restrict the loaf popping up and will always result in a more dense loaf than open baking. I’d recommend baking on a pizza tin or something. It’s also a LOT easier to get a smaller loaf to pop up and be fluffy, so consider practicing with a 300g flour recipe. Same flour:water ratios as 500g:
300g flour
200g warm water
1tsp salt
1tsp dried yeast
My top tip to stop it sticking during baking: bake on non-stick greaseproof baking paper!