I’m having the same (or similar) issue. It appears NPCs will go around trees, but nothing with much width - if they encounter a wall, they just stand in front of it even if there’s an opening beside the wall segment.
Here’s an example.
That NPC just stays there.