On the fifteenth day of the war Drona is unstoppable, and the Pandava command concludes that he will lay down his weapons only if he believes his son Ashvatthama is dead. An elephant of that name is killed, and Yudhishthira is asked to carry the report, because Drona will believe him and would believe nobody else.
He says that Ashvatthama is dead, and then adds, in a lower voice, that it was the elephant. Krishna has the conches and drums sounded so that the qualification is not heard. Drona lays down his bow, sits in meditation on the floor of his chariot, and Dhrishtadyumna cuts off his head.
The epic attaches a physical penalty. Yudhishthira's chariot had always run a little above the ground, a visible sign of a man who had never lied, and after he speaks it settles onto the earth like anyone else's. The detail is small and it is the whole point: the poem does not argue about whether the deception was justified by necessity, it simply records that something was lost and shows you where.
That is the shape of the character throughout. He is not righteous in the sense of being good at outcomes. He gambles away his family, he holds to agreements that ruin him, he is talked into a lie by a god and pays for it, and the epic keeps him as its measure of dharma anyway, because dharma in this text is a standard you fall short of rather than a rule you can follow safely.