> why not just move the guns so they do not shoot through the props?
Some did do just that.
With the British Foster mounting[0] variants of the S.E.5a, Sopwith Camel and Nieuport fighters mounted their guns over-wing and above the arc of the propeller. Convergence issues still apply here, as noted by the other comments.