Hi
yes, its a practice thing for muscle memory. "Locking in your thumb" to the position on the neck will help alot toward keeping position.
Its sounds like you need to focus on 'maintaining your position' which is all about being present in your hand while practicing your scales.
in two parts it would be 1) knowing your scale patterns (and how they 'link together') along with envisioning them in your mind as they lay across the neck. 2) All the while keeping a good hand grip/position —as to not 'lose your position'
It can seem daughting to think about all the possibilities for playing and reading but
tackle each situation as it comes up.
For Example; playing in A major in 1st position—and you're losing position. Specifically reaching fret 4 to 2 on adjacent strings.
- Before sight-reading (or working on related material) Practice the A major scale in that position (Ascending and descending as wh, half, quarter and eight notes on the same metronome click, then with 'a pattern' at the various rhythmic values). This includes more than the frets you need to play but; is your fret-hand in the proper position?, with your thumb in the proper position?, using your fingertips?, reaching out for note with fingers and not collapsing the thumb?
- Now work on sight reading in that key for that position.
- Once confortable, can you play the Amajor scale in 2nd position, 4th position, 5th position etc?)
- work any new position and return to sight-reading materials in that key but from the NEW position. (and the cycle continues)
These scale practice techniques are the ones that never get introduced or are skipped over but I've found them to be very helpful for "neck awareness", killing blind spots, as well as making your practice sessions alittle more engaging.
Good luck