I think that simply stating that we disagree with an assumption (that there should be no genders and that the body is just a shell, etc.) is enough. Something like: “I don’t believe that actually. I think that gender is closely related to one’s sex and that the body is not just a shell.” If they want to take it further they will ask you to clarify your opinion or answer with something. Perhaps they will ignore your comment and carry on with their conversation as if you said nothing.
One must be quick and confident, or the moment will pass. It seems that you were unprepared for those comments, and I don’t blame you. I’d be surprised and would probably not comment either. But maybe now you know how some of these people think and maybe next time you will find the courage to state an opinion contrary to theirs. It takes practice. I used to always be silent when people rubbished religion, but nowadays I am more comfortable making it clear that I disagree. I don’t do it in a way that opens up space for an argument. (Of course, people are free to cause an argument if they get upset and we always risk that possibility by disagreeing with their opinion.)