Missing ADC data while saving data block in SD card

The sine wave is at 1kHz. The spectrum that I am targeting should be up to that value. The sampling rate can be up to 10kHz.

The same data logging issue applies even when I use the internal ADC with the analogRead.