It's because you're using move to direct which doesn't take into account any solids. You should continue using pathfinding and find a path to the player, not move to. Although there is a pathfinding action under move to which might work but I've never tried it, it's fairly new.