So when he [i.e., her husband] saw his shirt torn from the back, he said, "Indeed, it is of your [i.e., women's] plan. Indeed, your plan is great [i.e., vehement].
(What is the recompense (punishment) for him who intended an evil design against your wife...), in reference to illegal sexual intercourse,
إِلاَ أَن يُسْجَنَ
(except that he be put in prison)
أَوْ عَذَابٌ أَلِيمٌ
(or a painful torment) tormented severely with painful beating. Yusuf did not stand idle, but he declared the truth and exonerated himself from the betrayal she accused him of,
قَالَ
(He Yusuf said), in truth and honesty,
هِىَ رَاوَدَتْنِى عَن نَّفْسِى
(It was she that sought to seduce me), and mentioned that she pursued him and pulled him towards her until she tore his shirt.
In the last two (28 29) of the verses cited above, it has been stated that the ` Aziz of Misr had already realized by having heard the child speak in the manner he did that some special supernatural situation was there to demonstrate the innocence of Sayyidna Yusuf (علیہ السلام) . After that, according to what the child had said, when he saw that the very shirt of Sayyidna Yusuf (علیہ السلام) is really torn up from the back, he became certain that it was Zulaikha who was at fault and it was Sayyidna Yusuf (علیہ السلام) who was innocent. So, first he addressed Zulaikha and said: إِنَّهُ مِن كَيْدِكُنَّ that is, all this is a guile of yours whereby you wish to pass on your wrongdoing to someone else. Then he said that great is the guile of women for it is difficult to understand and not easy to get out from. The reason is that they outwardly give the impression of being soft, delicate, even weak. A non-discerning onlooker is likely to believe in what they say. But, given a lack of wisdom and honesty, that could be a web of deception. (Mazhari)
According to a narration of Sayyidna Abu Hurairah ؓ عنہ appearing in the Tafsir of Al-Qurtubi, the Holy Prophet is reported to have said: The guile of women is stronger than the guile of Shaytan - because, about the guile of the Shaytan, Allah Ta ala has said that it is weak: كَيْدَ الشَّيْطَانِ كَانَ ضَعِيفًا (4:76); and about the guile of women, it was said: إِنَّ كَيْدَكُنَّ عَظِيمٌ (great is the guile of you women - 12:28). And it is obvious that not all women are meant here. Instead, meant here are only those of them who are involved in practicing guiles and excuses.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 24–28
Zulaykha, the wife of the nobleman, was charmed by the beauty of Joseph. She constantly tried to seduce him and one day, finding the opportunity, she closed the door of the room. This was a very critical occasion for an unmarried youth, but Joseph had preserved his godly nature and this nature came to his rescue on this occasion. The capacity to distinguish between truth and untruth, right and wrong, is ingrained in every human being by birth and this serves as a warning on all such occasions. To ignore it amounts to ignoring the voice of God. One who does so is deprived of God’s succour so that his moral strength gradually ebbs away. On the contrary, one who immediately bows down before the divine call, as soon as it is given, can count on God’s help; this improves his moral fibre and on future occasions he becomes stronger in the face of evil. What prevented Joseph from indulging in evil was in fact the fear of God but, at that time, invoking God before Zulaykha would have been ineffective. This was not an occasion for a declaration of Truth but an occasion when he had to save himself in a critical situation. In view of this situation he referred to Zulaykha’s husband. He said that ‘her husband was his master and he had maintained him in his house with due honour. Therefore, it was not possible for him to besmirch the honour of his benefactor.’
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.