Anya thought it was very strange that Xander cried earlier that day while she herself seemed very contained and acted like nothing was wrong. Anya kept asking explicit questions such as, "Is the body going to be cut open?" Everyone looked at her oddly because not only was she acting like a stereotypical male being interested in a dead body, but she was also acting almost completely unemotional towards the situation.
Meanwhile, Xander acted more like the female in the situation by being completely distracted and double parking in the street and by comforting Willow. However, it's not as simple as Xander and Anya playing reverse gender roles. Anya does not understand mortal behavior, while Xander is just expressing normal human behavior. Because of this, however, it does seem that Xander is acting more feminine in the situation.
Towards the end of the scene, it seemed like their roles went back to being stereotypical for a small period of time when Anya cried that she just plainly did not understand death and when Xander punched the wall out of anger. This did not last long, however, and Anya went back to asking strange questions while Xander wanted to be there for Buffy.