There's no shame in losing and not feeling any shame over losing and leaning into the gloater's self-congratulations generally tends to suck the wind from their sails.
Either be sincere or be over-the-top sarcastic with your congratulations because like you say, it's a worthless accomplishment, it means nothing so there should be little emotional attachment in the outcome.
_________________
When a clown moves into a palace, he doesn't become king, the palace becomes a circus.
"Many of us like to ask ourselves, What would I do if I was alive during slavery? Or the Jim Crow South? Or apartheid? What would I do if my country was committing genocide?' The answer is, you're doing it. Right now." —Former U.S. Airman (Air Force) Aaron Bushnell