Gender is not an illusion, but it is not binary either.  The body is male *or* female but gender includes male *and* female polarities in all human persons.  Bodies are male *or* female (*or* intersex),  but all men and women share one and the same human nature.  There is no such thing as two different human natures, one male and one female.  This is clearly explained in the Theology of the Body, Chapter 8:

https://www.ewtn.com/library/PAPALDOC/jp2tb8.htm

Corporality and sexuality are not completely identified. All men and women are fully homogeneous in their whole being.  This is not about human ideologies.  The biblical "flesh" cannot be reduced to patriarchal gender ideology.  See also Amoris Laetitia #156, where Pope Francis clearly states that sex and gender cannot be separated but can be differentiated.