ESP32 Sample a 1kHz square wave (10%-90% duty cycle) with analogRead()
The ADC read is very short, you can see that with your logic analyzer trace.  So you can rule that out as the problem.

The Serial.print lines inside the ISR are probably taking way too much time to handle the interrupts at the 1kHz rate.  You should instead buffer the result and print out the results outside of the interrupt.