Line renderer not displaying correctly

Currently, I have a line renderer which connects 2 sprites together , however in game view they are not connected correctly. Moreover, in scene view with 2d selected the lines are displayed correctly.

I guess the problem is with the camera?

Any suggestions?

I changed the camera settings and it seems to have fixed the problem.

I realised there was a problem with the actual mouse click which was passed in as pointer event data.

This led me to change the camera settings as the mouse click did not reflect the actual position on the screen.