Wiktionary
fight a losing battle
vb. 1 To continue to wage war when it is clear that one is not going to win. 2 (context idiomatic English)To try to do something so difficult that it will probably end in failure.
Usage examples of "fight a losing battle".
Rather than fight a losing battle to learn higher magic, they would concentrate on the lesser skills of illusion and sleight of hand, and be happy with what they were.
But equally obviously, he was not prepared to fight a losing battle against the new president on the issue.