Praise be to Allah.
Being of sound mind is the basis of accountability, so if a woman is not of sound mind, accountability is waived in her case, because the Prophet (blessings and peace of Allah be upon him) said: “The Pen has been lifted from three: from the sleeper until he awakens, from the child until he reaches puberty and from the insane person until he comes to his senses.” Narrated by Abu Dawud (4403), at-Tirmidhi (1423), an-Nasa’i (3432) and Ibn Majah (2041). This hadith was classed as sahih by al-Albani in Sahih Abi Dawud.
But her guardian must protect her, take care of her and keep her away from haram things, so he must prevent her from appearing in front of non-mahram men without hijab, and prevent her from being alone with any non-mahram man and the like, so as to protect her and to prevent mischief and prevent others from being tempted by her.
Ibn Qudamah said in al-Mughni (8/155): … And because the same is required of one who is not accountable as one who is accountable with regard to avoiding haram things such as alcohol and zina; the only difference is whether they incur a burden of sin. End quote.
Ibn ar-Rif‘ah said in Kifayat al-Nabih (15/62): The guardian of a minor girl or a woman who is of unsound mind should protect them from what he should protect one who is accountable from. End quote.
So her guardian must protect one who is not accountable from haram things, which includes a woman showing any part of her body in front of non-mahram men.
And Allah knows best.