I carried out your advice.
However, npc did not solve the problem that did not go forward.
I set CanSearch to false until I entered the building.
Set CanSearch to True only when Npc arrives at the waypoint and points to the next point.
Use Vector3.SqrManitude to set CanSearch to True when the values of the previous and current coordinates are less than or equal to 2 in Math.ABS, execute the SearchPath function, and set it to false.
Vector3.SqrManitude checks are performed once every 10 seconds.