A.W.
My son had the same experience! We were at the ferry landing in Anacortes and the toilet flushed while he was on it... it scared him too.
What I had to do with him was use the toilet first and then flush and then have him go. Also, he will not use toilets that flush automatically, so sometimes I have to find a different bathroom.
I dont know if that helps, but I wanted to tell you it happenned to me too! See if going potty before her makes a difference....
Good luck!