leave, go off, etc. with your tail between your legs
Definition
›to leave, feeling ashamed and embarrassed because you have failed or made a mistake: The losing team went off with their tails between their legs.Losing and being defeatedScoring, winning and losing in sport