Actually is not a guitar problem, but all 12-TET tuned instruments have this, it is just a side effect of harmonic math. In the guitar case it is not only the tuning that counts, also the material the string are made and the diameter of the strings count to the final frequency, and we are using parallel frets so applying the same distance to different strings. There are guitars with not parallel frets that try to com…
There are two type of “not parallel” frets and neither have anything to do with the diameter of the strings. Different guitarists use different diameter strings because the diameter determines the tension when you tune to pitch. Different people prefer different tension. Most shredders prefer light tension. Most jazz players prefer high tension. The diameter is compensated at the bridge and in some guitars the nut. W…
When the string's action is higher above the frets, the tension increases more when fretted than open, to a greater degree than low action.
So the saddle for that string needs to be positioned such that the plucked portion of the string is slightly longer than it would need to be if the tension were the same as the open string.