Review the pathfinding algorithm to see if there's a way to reduce wasted calculations, e.g. by using a priority queue to go down the lowest weight paths first instead
If this isn't adequate, increase the batch count (potentially to infinity) to prevent the bug from occurring at the expense of performance
If this ends up feeling really bad, then consider job+burst-ifying the calculation
and potentially positioning it to run after a LateUpdate so it can run in parallel with rendering (? not sure if this makes a difference on WebGL)
LateUpdate
so it can run in parallel with rendering (? not sure if this makes a difference on WebGL)