NavigationAgent2d sometimes goes should the part not covered in mesh

Godot Version

4.7

Question

Good day. I'm a Godot beginner and try to implement worker (navigationagent2d) go to ammo depotentrance but not hit the building, collide with it etc. My tries with static2d on ammo depot were not successful because it was still hitting edges of the building. Right now building is just a area2d and there is a navigationregion2d + polygon inside. Sometime agent goes around perfectly but sometime he goes straight through the polygon without the mesh. What am I doing wrong?

Here is the video: https://youtu.be/_ZgXyRn5qtQ

Here is the image: Screenshot 2026 09 27 at 17 05 50 hosted at ImgBB — ImgBB

Thanks in advance.