There's a bit of trigonometry involved, but there are at least three effects that can slightly change the pitch due to the finger position and pressure between frets.
Here's one:
Three points, the tops of two frets and a spot on the fret board between them and below them in height makes a triangle.
The shortest distance of the two straight lines between the fret tops and the fret boards are when they are equal, e.g. when the finger pressure position is exactly between two frets. Any other fretted geometry results in a slightly longer total distance of those two line segments. e.g. if you press near the fret nearest the bridge, then the triangle distance will be slightly longer. To provide this longer length, the whole string has to be stretched more. Stretching a string creates a higher tension. And tension (as well as length, diameter, and distributed weight) is one of the things that effects the stable vibrational modes of the sounding portion of the string, e.g. pitch frequency.
Secondly, the finger pressure that frets the string does not always have to take the string all the way to the fret board, but just enough to keep the string from vibrating off of the fret. Additional pressure could again change the length of the string segments between frets, either lengthening and/or increasing tension along the vibrating portion.
The third effect can be created by moving the string slightly sideways across the fret during the fretting. This slight angle offset can slightly lengthen the distance between the fretted point and the bridge, both stretching and lengthening the strings, which again will affect the stable vibrational modes.
Either or multiple of these can be modulated by finger position and pressure. And exactly when they are modulated, either during the pluck transient or the stable sustain portion of evolving string motions can also have different affects on the timbre, as well as the perceived pitch.