Hi Anders thanks for posting on the community! The hierarchal auto layout feature does automatically put the lines at the bottom of shapes. There is not a way to change that default. If you would like to make changes after the Auto Layout has arranged everything that will need to be done manually.
As you have noted if you are linking to a shape that is not directly below the line will go through your shape that is in between. As a workaround if you right click on the shape you can select Arrange > Bring to Front. The shape will then be brought to the front so that the line will be behind it instead. If you are instead hoping to have it go around the shape you will need to make that change manually.
As this is an automated layout feature it is meant to help arrange shapes and lines but manual adjustments may be needed to fit your exact needs. I apologize for any inconvenience this may cause and thank you for your understanding.