Happened to me too. In fact, there are many places where this happens in the entire game. Enemies will get stuck on walls and just stay there, allowing you to hit them endlessly.
Do you mean after enemies get stuck on a wall, they remain stuck even if the wall is no longer between you and them? Just fixed that for Gascoigne but I haven't seen it on other enemies.
If they're just trying to walk straight toward you and can't get past a wall, yeah, they're a little dumb lol. Would need to write a pathfinding algorithm and haven't.