Strange lesson pony quirk

Hi! This is the same horse that I asked about loading help, want to report after 2 months of 3x a week trailer training she walks herself right into her “spot” on the slant load! No kicking/pawing/panicking either!
But she’s got this weird quirk that I just want to see if anyones seen before, I couldn’t word it right to look up lol.

She’s 24, literally no history except she was a broodmare/maybe recip that stopped producing so she was given away.

She w/t/l, rides one or two handed, stops, backs turns, very calm and unflappable. Can be stubborn but easily corrected. No spurs and in a very mild tounge relief short shank. Use a dressage whip to try and push her hip over when she wants to drift.

Weird thing? I can w/t/l on the rail with no issues, by myself. If there are other horses walking on the rail she’s fine. She is NOT snappy or rude to other horses, maybe gets too close to them but otherwise ignores them.
Trotting on the rail, with other horses? NOT happening. Either walking or bolting to the center and stopping. Every once in a while she’d get behind a horse with a similar pace and trot almost follow-the-leader style, without any rider input, reminds me of a trail string horse.
Today we had everyone canter on the rail, she did flawlessly while everyone was stopped for water. When everyone started cantering though? Pretty sure you could’ve lit her tail on fire and she wouldn’t move lol. She planted herself in the center and would only turn in a tight little circle, no forward movement. Everyone stopped dismounted and we walked out fine.

There have been 0 accidents since she’s been here, no one has ever run up her/over her/slammed into her, no horse has ever kicked/bit/squealed at her during arena work, and she has no qualms with walking in the center of the group of these horses during warm up. They stand together just fine.
It’s also only 5 other horses and us in a large open arena, plenty of space between horses for all 3 gaits. I talked to the bm and we really aren’t worried about trying to correct this, she just won’t do rail classes lol. She’s 24 and this is the least problematic quirk she could have, just makes group lessons different.

Since horses can’t talk, anyone seen this? Do we think it’s just something she’s never done before and having horses running behind and infront of her freaks her out, or do we think she was rear ended in the past and it’s a bad memory ?
Mule-headed pony for tax!
20241019_090301|281x500