It seems to me that the pathing is trying to use the least TU cost of tiles to decide which is the best running path based on the first two images I'm attaching (000,001) which results in some cases using a zig-zag pattern. Oddly enough if I choose a closer destination within the same path it won't zig-zag (002,003). The last two images are similar to the two first ones but with the destination changed to one tile over to denote the zig-zag pathing. As far as I can tell, the final cost of running to the destination in this particular case is the same for both TUs and energy regarless if you run in zig-zag or if you run in a straight line via shorter 'dashes' so the code decides to always move to a tile with least TU requirements (?), just guessing here.
My only suggestion at this point is, in the cases where more than one path cost exactly the same TU / Energy, pick the path with the least number of diagonal moves.