This will most likely be a “working as intended”, here’s a quote from the Minecraft Wiki Rail article:
“In Java Edition, most mobs avoid walking on rails,[2] but they ignore rails when they are already on them. Jumping mobs like slimes, frogs[3], and goats can jump onto rails, but frogs and goats do not walk onto rails.”
This will most likely be a “working as intended”, here’s a quote from the Minecraft Wiki Rail article:
“In Java Edition, most mobs avoid walking on rails,[2] but they ignore rails when they are already on them. Jumping mobs like slimes, frogs[3], and goats can jump onto rails, but frogs and goats do not walk onto rails.”