The FFT assumes that you have a perfect fit of the (co)sinus in the sample range.
At higher frequencies the 5kHz start to deviate so the samples may no longer fit perfectly in the fft and you may get spectral bleeding.
This bleeding will vary with the error of the 5kHz signal
Can you apply a window to the input of the fft and see if that clears out the spectral bleeding?