Narada's sermon on Varnashrama Dharma to Yudhishthira has this message:
श्रीमद्भागवतपुराणम्/स्कन्धः ७/अध्यायः १२
कल्पयित्वाऽऽत्मना यावद् आभासमिदमीश्वरः ।
द्वैतं तावन्न विरमेत् ततो ह्यस्य विपर्ययः ॥ १० ॥
As long as one does not give up distinctions like 'this is a man, this is a woman', then the superimposition of qualities in those bereft of qualities, will continue. That is, there is a misunderstanding, viparaya, perceiving one as the other. One has to let it go through acquiring right knowledge. Otherwise, bondage will be a never-ending story.
This indicates that the idea of gender, male and female, is not present in the true nature of the Atman. It is certainly a superimposition, a vision of error, in the Atman.
Sridhara Swami's commentary is given here: