If you’re absolutely sure that you can’t hear distortion on headphones, I suspect that your issue is that the speaker(s), or the amp circuit powering them, are bad in a small subtle way in which they only distort at certain frequencies corresponding with a couple of specific piano notes on the keyboard. Since string sounds have different frequency spectrum, that might explain why you don’t hear the issue with string sounds.

It’s even possible that the issue is that there is a dead bug or a piece of crud lying on one of the speaker cones. Do you notice the distortion mostly from one side? Try turning the piano up on its back edge (assuming it’s one that is small enough to do that) and see if that fixes it by making the crud drop out of the speaker cone. (I don’t know if it’s one of those keyboards that’s like a small stage synthesizer on a stand l, or if it’s a full piano sized thing.)

If you have an old pair of computer speakers in the garage, you can plug those in.

Make sure that the difference you’re noticing between headphones and speakers isn’t just a question of frequency response. For instance if you had a bad ROM and the samples for a couple specific notes were only slightly corrupted, maybe the distortion isn’t audible unless it’s on large speakers with more bass response.
_________________________
Tony Fabris