Swopping movement and ability functions on mouse doesn’t work out well when interacting with the environment or NPC’s i.e. using movement as r-click and ability as l-click.
Welcome to the forum…
This is a known issue.
Generally people who prefer to change the mouse clicks like you suggest tend to find using a controller is a better solution for them in the meanwhile.