Can you interrupt her when she goes into shadow-chasing mode? If so, then medication probably won't help. If you can't interrupt her, I would seriously look into medication (sometimes even anti-seizure meds help) before going any further.
Assuming you can interrupt her, I doubt it would go away on its own for any reason. Like you said, it is a self-reinforcing behavior. I would not give her the opportunity to practice the behavior uncontrolled, especially in a working setting. If it is not truely compulsive, and she just thinks it is fun... you could try putting it on cue. Sometimes this works really well for certain weird behaviors. Then once you have it under stimulus control, just don't give the cue when you need her to do something else. You could then give the cue to chase as a reward for doing something you wanted her to do, like pay attention (Premack's Principle). She may then be able to work if she doesn't see it as a conflict, but rather working as a way to earn the privilege of shadow chasing. Does that make sense? I'm not sure if I am explaining it well.
Here is an example:
My first competition obedience dog was a coonhound (am I a masochist or what?). Being a hound, he most desired sniffing the ground, followed by food. At first I tried to never allow him to sniff the ground. Let me tell you how well that worked out! Then I decided to put the sniffing on cue, "Go sniff!" Then I would ask for a few steps of heeling, when he did well, I would C/T and release him to go sniff. Sniffing (high probability behavior) was reinforcing for heeling (low probability behavior). This worked so much better that we were able to finish his CD with placements.