One other thing I noticed in tracking down these perf issues that is unrelated to the allocation mentioned above, is the use of Physics.SyncTransforms and Physics2D.SyncTransforms in AIBase.OnUpdate. There’s a call to both of these functions at the beginning and the end of OnUpdate, two calls total for both of these functions. My understanding of how these functions work is that they should be unnecessary to call from within OnUpdate, and could very well be adding significant overhead to the entire pathfinding project.
This thread talks about limiting the use of SyncTransforms, and makes a good case for not needing them to be called at the beginning and end of AIBase.OnUpdate, especially considering every agent will be making these calls which are global in nature.
I tested removing those calls entirely from Astar 5.0.5, and there was no negative impact.