I've had follow, attack & patrol all be 'ignored'. I too think it's a pathfinding issue. It's happening whenever the pet is blocked by things like walls, rocks, structures, etc. ....even if it's only 1 wall long or a short/small rock.
So, if an animal is standing on one side of a rock, you're on the rock and your pet is behind you....it won't attack, no matter how few rocks separate them. If there's an animal outside my wall, and I open the gate and tell my pet to attack...it won't. If I'm on a rock and call my pet and it gets stuck in the rock so I tell it to patrol, it won't. If I have my pet on follow and run thru a group of rocks, my pet stops till I get far enough away for it to teleport to me. Most of the time, I have had to either get far enough away for it to teleport to me, or send it home, get into an open area and summon the pet again, etc to fix the issue. Many scenarios I've found this to happen, and found a few work-arounds.