ESP32 using Arduino: Internal Pull-ups don't work on GPIO25 or GPIO32
Hi all I got to the bottom of this for anyone googling:
Using analogRead attaches the GPIO pin you're using to the ADC channel and disconnects it from the pull-up. Calling pinMode(X, INPUT_PULLUP) after every analogRead will reinstate the bias.