If a woman understands the ruling on Hijab and this has been explained to her but she still refuses to wear it, she will be considered disobedient.
Likewise, if a woman wears the Islamic dress and then commits a sin, she is considered obedient because she is wearing the Islamic dress but she is also considered to be disobedient because she is committing a sin. Fearing to commit a sin while wearing her Islamic dress should not be taken as an excuse for not wearing it. Both of them should be advised to avoid committing anything that contradicts the Shari`ah. May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.