So the issue here is that the agent doesn’t move in a straight line to the target if I understand you correctly?
This is unfortunately an issue with navmeshes in that sometimes they do not produce the most optimal path.
This is described a bit more here: https://arongranberg.com/astar/documentation/dev_4_1_6_17dee0ac/getstarted2.php
The RichAI movement script has an option for ‘Funnel Simplification’ which tries to use graph raycasting to make the path more optimal after it has been calculated. This is unfortunately not yet implmented for the AIPath script.
Usually these issues are most prominent on large open regions. If you can add some small obstacles that break up the world then it might work better.