An audition is a job interview. It would be illegal for an office interview to ask that, so it's similarly improper at an actor's audition/interview. Perhaps if there's conversation in addition to the song, monologue, or reading, someone doing the hiring might get a vibe from topics discussed, how they talk and express themselves, how they dress, etc. and make some kind of judgment, but actors (and people who go on interviews) are constantly being judged on a variety of things. They might ask an actor if they would be comfortable perhaps kissing another character perhaps, maybe indicating if it's a character of the same sex. But no, it's not permissible to ask outright someone's sexuality, their age (other than if they are a minor), their religion, or if they're married, have children, etc. among other codified types of forbidden questions.