After taming a wolf, it won't follow down an enclosed chamber/tunnel that runs diagonally. See screenshot.
Linked issues
Attachments
Comments 6
Affects 1.17 Pre-release 1
Relates to MC-120494
The wolf is probably just scared because most mobs are scared of rails and will avoid these if possible. This is logical, because a minecart might hit the wolf.
Mobs generally avoid walking on rails. I don't think this has anything to do with this being a diagonal, it's probably just that the dog can't reach you without crossing the rails, and thus just stays where it is.