There're a lot of great replies in this thread and there might be some real answers for you if you take the time to heed them.
I examined several of these avenues in my own game and found that the problem wasn't in my approach, stroke or aiming. I realized I wasn't able to predict when it was going to happen, so I quit trying to fight it.
Instead, I gauged every shot I made by how much
commitment I put into it. If I did something other than stroke deliberately and confidently, I counted it as a bad stroke whether I made the ball and got my position or not. That's all. No negative criticism, just an observation. You can't tell your mind how to feel about something. It just does and makes its own corrections, despite your best efforts to get in the way.
Eventually I saw that by committing to the shot, good things happen. I didn't have time to be sharked or distracted. My yips lessened to the point they rarely bothered me anymore. They became a waste of my time and almost silly to dwell on instead of firing balls in the holes. My goal became doing what I set out to do, no matter what was going on around me or what my head was telling me. All by understanding that when I bent over to shoot, if I committed to the shot, I'd be much better off.
Best,
Mike