if you were to control click on this function astar2d.getpointpath() it would tell you that it doesn't work in a thread, and I programmed my multi threaded path finding system with that in mind, but then I decided to try it anyways because it could offer higher performance. It worked perfectly. Also to anyone who might think that it isn't actually running on a separate thread and just looks like it is, I know it is because every thing it does is completely desynced from the main thread and I spent 2 days trying to make it not crash because of that.
But my main point is, it said it would output an error and an empty PoolVector2Array but it didn't, instead it returned a working valid astar2d path.
EDIT: It says it won't work in the online docs too. https://docs.godotengine.org/en/stable/classes/class_astar2d.html?highlight=astar#class-astar2d-method-get-point-path