Problems with the NavigationRegion2D

Godot Version

Godot 4.7

Question

I’m having some problems with the NavigationRegion2D. I created an enemy, the farmer shown in the image, that follows the player, the character in black, within this NavigationRegion2D. However, after I added the collisions to the NavigationRegion’s group, the farmer sometimes takes paths that don’t make any sense. How can I fix this?