Every time they overlap a solid like this they're unable to move. I guess being inside a solid breaks the pathfinding ability..
Develop games in your browser. Powerful, performant & highly capable.
How did they get there in the first place?
That would be where I would start.
You can also have an event to check if they overlap a solid and move them, but I wouldn't go to that solution first, as you might run into it later at undesired times.