Hello there,
I haven't tried your pathfinding yet but it looks solid. However when I dropped the code in my game project I saw that the grid component is giving me a warning since Unity introduced its tilemap system.
Just thought I'd let you know!
Sincerely,
Mark H.