It is not an idiom to be ashamed of not fighting.
Similar idioms include:
Win without force: If you don't win in a proper way, you will be disgraced if you win.
Although defeated, it is still glorious.
Though dead, it is still glorious: Although a person died, he died honorably. Although a man dies, he dies honorably.
Get the right place when you die. It means to die with value and meaning.