How does the microcontroller read potentiometer resistance as integer without regard to potentiometer value?
Apparently you hook up the potentimeter as a proper potentiometer, that is: the wiper supplies a fraction of the toptal voltage to the A/D ipnput. That fraction does not depend on the Ohmic value of the potentiometer: when you tae a higher value, then for a given position of the knob bot 'sides' will get higher values, but the ratio will not change.

Note 1: the voltage supplied by the wiper will not change when you take another Ohmic value for the potentiometer, but the impedance (effective series resistance) does change. As long as this impedance (worst case 1/4 of the value of the potentiometer) is lower than what the A/D input specifies as maximum this is not harmfull.

Note 2: the most common potentiometers are linear, but there are also logarithmic (and anti-logarithmic) potentiometers, which will (for a given position) give a very different ratio.