My teacher and I talked about this exact thing in my last lesson. It is the release of pressure on the string with the left hand, but not lifting right away off the strings.... then lifting off and moving to the next position that minimizes squeak. He showed me a diagram in Pepe Romero’s book which shows that the timing of left and right hand are synchronized; when the right hand touches and prepares on the strings, the left touches but does not press. Then the left presses at the same moment the right loads the strings.
We practiced this in the ending of the A section of the Bach Allemande 996 where while trying to play legato, I was producing too much string noise as the ending is on the wound bass strings. Breaking the movements into parts, I could see that before, I was lifting my fingers off the strings and as I did my fingers slid a little (even though I was doing my best to lift straight off. If there was a nano second when I released the pressure but did not lift the fingers off, that made much less noise when I then lifted them off entirely. Practicing this in parts and then making it one motion, made a huge difference in the amount of noise produced.
Often, when people practice staccato scales, the right hand is playing staccato while the left is playing legato. So practicing true staccato works on the timing and synchronization of the hands and then being aware of that release of pressure of the left before taking the fingers off the strings. This has helped me a great deal.
When the sun shines, bask.
Classical Guitar forever!