I would say that more importantly than winning or losing a debate is to know which debate you should participate.
Best thing to do, if you detect you're about to enter a debate, is to ask "What would it take for you to change your opinion?". If they reply with "nothing" or a vague answer or whatever, exit the debate. Likewise though, ask yourself the same question.
Sometimes you gotta preemptively "lose" a debate, by not answering at all. At most a "Alright, I get your point but I disagree" which also doesn't really add much to the discussion.