Thanks for the answer, I appreciate your input.
I figured there is a limit and I would have stress test that but yeah, it's not an optimal solution.
Though basically the whole layout area is 1920px (6 sections of 320 that loop). The area is just a round corridor with doors, so I don't imagine anyone walking in circles more than 2-3 times, but I would probably want to have 10 loops just to be sure. Hopefully pathfinding can handle 20,000px.
If I really have no choice I thought of maybe breaking the 3rd wall as an option, "hey you reached the end of the world, please turn back" or something like that :)
As for EasyStarJS, I prefer not use 3rd party addons, as I've been burned before with unmaintained and broken addons.
P.S I'm already using an invisible tilemap to set the blocked cells, I didn't intend on centering it on the player, as I would probably need to regenerate the map every tick, I just have a tilemap for each section, and when I push that section to the other side, I regenerate the area around it.