Here's my two cents. The fact that it's not constant leads me to believe that you aren't setting up to the shot properly and your base isn't the same every time.
I do recommend an instructor who can watch you and provide clear assistance. In the meantime, work to develop a pre-shot routine that starts with how you set up, place your feet, arrange your body so that it's the same every time.
Now go find that instructor.
Brian in VA
Now my 2 cents.
Brian has some good advice. For years I struggled with the exact same issue.
Here is what my problem was (and sometimes still is);
1. I never had a
good pre-shot routine. I never stepped into the line of aim the same way. I never went through the same motions as I was getting down on my shot, this led to problem 2.
2. After getting down on the shot, I adjusted my elbow and shoulder to the line of aim. This is bad! And, I'll tell you why. Your body likes to fall into a natural rhythm and move in a certain direction
when you are not concentrating on it. What does that mean? When you focus on the parts of a shot you
should be focusing on, your muscle memory and natural stroke always do what they
naturally do. You can't focus on everything at once.
Here is how I found out #2 by accident;
I was practicing a straight in shot over and over, while down on the shot I was thinking about the spot on the object ball I needed to hit (cause I kept rattling the object ball), I was down on the shot for a extended period of time thinking. While I was thinking, I let my body relax with no stroke movement, after my thought process finished, I noticed my tip was pointing at the right side of the cue. I quickly readjusted my elbow and arm to line the tip with the center of the cue, then I had an epiphany. I grabbed my GoPro and set it up facing me, and shot the same shot again 10 times. after watching the slow mo replay, I noticed as my fore arm came back and stopped, my elbow settled into a natural
comfortable position before I delivered the stroke. This
new position always applied right english to the cue.
If you have a video camera, I suggest you video yourself to see exactly what your issue really is.
You can also do a quick test the same way I found out by accident. Setup a straight in shot. Get down on the shot. Come to a complete stop with no movement. Relax a little and see if your tip moves.
Don't mistake this quick test as a prove-all method for determining your issue.
But it might give you a little insight into the "faults of your stroke".