Then it might be the ADC adquisition time.
High impedance sources heavily affect the adc, as it charges the internal sampling capacitor.
If the impedance is too high and the sampling time too low, you'll get bad readings.
ADC capacitance is usually ~10pF, small but still might not fully charge in time.
A simple fix is to add a small 1nF cap near the ADC pin, so it has no trouble sourcing the current.
Also try increasing the sampling time in the ADC settings.
But basically you want at least 5RC time to let the capacitors charge, I'd use at least 10RC for best stability.
With 10pf and 10K, 10RC would be 1us.
But the ADC pin has also some impedance and there might be other considerations, so check the datasheet and reference manual.