It was not due to the boon of Gandhari according to KMG's translation.
It clearly describes that Duryodhana's upper body was made of Vajra and was indestructible unlike his lower body.
Three reasons are that Duryodhana's upper body was indestructible, Duryodhana would win had he not been defeated by deceit, ...
It was not Krishna who punished Yudhisthira. It was Indra who created the illusion and Indra later told that he created the illusion.
Then Shakra, the lord of the deities, endued with blazing prosperity, addressed Yudhishthira and comforting him, said, ‘O Yudhishthira of mighty arms, come, come, O chief of men....
This is an oversight error on part of translator N.A. Deshpande ji. It should read husband can flog/span wife, not the other way around.
The verse in question is
गुरुश्च ताडयेच्छिष्यं ततः सिध्यंति नान्यथा ।
भार्यां च ताडयेत्कांत अमात्यं नृपतिस्तथा ॥ ५४ ॥
guruśca tāḍayecchiṣyaṃ tataḥ sidhyaṃti nānyathā |
bhāryāṃ ca tāḍayetkāṃta amātyaṃ nṛpatistathā || 54 |...