The phrase is get your just deserts . . . not desserts. Although, I suppose you would get your just desserts if you were a good boy or girl and at all your meat and vegetables.
The word is deserts. Not desert (ˈdezərt) like a barren sandy waste land. Not desert (dəˈzərt) as is abandoning your post. But desert (diˈzərt) as in getting what is coming to you.
My goodness, but the English language can be confusing.
Anyhoo, the problem with the word and why there is a misconception with which desert or dessert or whatever is used is because the desert that is synonymous with deserves has fallen out of common usage and because it is pronounced like dessert.
So there you have it.