Things like this are hard to diagnose just based on a written description. Can you post a video of you playing the scale when it happens?
My first instinct would be to investigate if you are tensing up in some way when you use the thumb and shift position with the hand.
Can you have a naturally relaxed hand when you play the first three notes, C D E with 1 2 3? Can you then move your hand, still naturally relaxed, to the new position with the thumb on F, and play F G A B with 1 2 3 4, keeping it relaxed and supple? If so, can you keep this relaxation in the hand as you pass the thumb and shift the position? Sometimes we can kind of awkwardly try to force the thumb under the hand and press down to heavily on the thumb, but I don't know if that's your issue.