Most foreigners who came to Japan with little knowledge or skill in the Japanese language will certainly have experience of being praised by the Japanese with this sentence.
When the Japanese people start to point this phrase to you, it actually indicates that your Japanese is very bad. I said “indicates” and that doesn’t mean the Japanese saying such thing on ill purpose. Really the Japanese don’t want to let you down and probably want to motivate you also. This is a part of their habit called oseji (flattering), in which almost all Japanese are experts.
I think the Japanese are actually not lying either because maybe they have not finished the words. While “Nihongo ojyouzu desu ne …” is the first part of the sentence, the latter part: “…, Nihongo zenzen shabettenai gaijin ni kurabetara” may be kept in their mind. So it is not necessarily a lie.
If your Japanese is really cool, you will notice that they keep talking normally to you without praising your Japanese skill (either they forget or they feel it is unnecessary). Your Japanese is even better when the Japanese said, “kare/kanojo, nihongo jyozu desu ne,” in low-voice to their Japanese friend, not to you.
Those who don’t get disturbed with this oseji can happily enjoy daily life. But for those who become irritated and want to get rid of that repetitive words from their ears, the only way out is to master the Japanese language up to intermediate-level where the praising frequency will slowly decrease. If you translate “Osuki na dake tabetekudasai” as “Please eat only what you like” then prepare to be praised by the Japanese with “Nihongo ojyouzu desu ne“, which means your Japanese is bad.