Assalam u alayekum
I would like to ask if a person can be a different gender in their spiritual form other than their physical form.
A wali can temporarily take the material form of another human or non-human creature such as a whale or a bird, as stated by Sayyidi `Abd al-`Aziz al-Dabbagh in Kitab al-Ibriz and Mawlana Shaykh Hisham in one of his recent suhbas, so the answer is yes, although spirituality is hardly understood within the confines of either/or dualities such as gender, age, nationality, race etc. but Allah knows best.
Hajj Gibril Haddad