Ok this one is hilarious and sad at the same moment - it was in the early game of S&M:
I was EV training my pokes and encountered a shiny Magnemite. I had no berries at that time so I didn't really want to mess up my EV's by catching it, so I decided to be the "smart guy" and let it kill all my "to train" pokes first.
Unnnnnnfortunately one of them was a Whimpod ... I thought it will swap out below 50% ... well it doesn't against wild encounters ... it flees instead ... yea ... I FLED from a shiny Magnemite
It was a sad day ... xD