Are you working with her to become a service dog? Either way, you could get a vest with patches that say "do not pet" or "in training: ask to pet". That'll help some, but really the only way to stop people from doing it is to tell them.
My girl is incredibly well trained, socialized, and...