Yudhisthira lost himself, his kingdom, his wealth, his brothers, himself, and Draupadi. Draupadi was even dragged to the Kuru assembly. If that is the case, then why did Yudhisthira play dice for the second time where he had to go for 13 years of exile?
The vow taken by him is the reason for Yudhistrira to participate in the dice for (first and) the second time.
After Vyasa said that Yudhistrira is a (positive) reason for the destruction that is going to happen to Kshatriyas after thirteen years, Yudhistrira takes a vow with a span of thirteen years in the hope of avoiding such destruction.
All this happened just after the death of Sisupala.
You can observe the lines by Vyasa from the following excerpt
Vaisampayana continued,--"Hearing these words of the king, the exalted son of Parasara, the island-born Vyasa of dark hue, spoke these words,--'For thirteen years, O king, those portents will bear mighty consequences ending in destruction, O king of kings, of all the Kshatriyas. In course of time, O bull of the Bharata race, making thee the sole cause, the assembled Kshatriyas of the world will be destroyed, O Bharata, for the sins of Duryodhana and through the might of Bhima and Arjuna......'"
The vow was taken by Yudhishthira, from the same section is in the following excerpt.
Then Yudhishthira endued with great energy addressing all his brothers, said, 'Ye tigers among men, ye have heard what the island-born Rishi hath told me. Having heard the words of the Rishi, I have arrived at this firm resolution viz., that I should die, as I am ordained to be the cause of the destruction of all Kshatriyas. Ye my dear ones, if Time hath intended so what need is there for me to live?' Hearing these words of the king, Arjuna replied, 'O king, yield not thyself to this terrible depression that is destructive of reason. Mustering fortitude, O great king, do what would be beneficial.' Yudhishthira then, firm in truth, thinking all the while of Dwaipayana's words answered his brothers thus,--'Blest be ye. Listen to my vow from this day. For thirteen years, what ever purpose have I to live for, I shall not speak a hard word to my brothers or to any of the kings of the earth. Living under the command of my relatives, I shall practise virtue, exemplifying my vow. If I live in this way, making no distinction between my own children and others, there will be no disagreement (between me and others). It is disagreement that is the cause of war in the world. Keeping war at a distance, and ever doing what is agreeable to others, evil reputation will not be mine in the world, ye bulls among men. Hearing these words of their eldest brother, the Pandavas, always engaged in doing what was agreeable to him, approved of them. And Yudhishthira the just, having pledged so, along with his brothers in the midst of that assembly, gratified his priests as also the gods with due ceremonies.
Since the vow includes living under the command of relatives. Yudhishthira needs to follow the command of Dhritarashtra, who is his father's elder brother. Thus, Yudhishthira has played the dice because of the vow since the command of his father's elder brother in the span of those thirteen years.