Incorrect route calculation

I’ve been looking at the forum more and seeing this link:

can this be the solution, even though my map is not rotated? I have tried to modify it but since the script belongs to the package folder I cannot modify it