Definitely there are times when the sex of an actor needs to be known (Lady Macbeth for example), but think their CV plus photograph would show that.
Yes but if you are advertising for the role of Lady Macbeth, wouldn't you say "only female actors need apply"? Or if you were planning a gender reversed version of Macbeth (and why not?) wouldn't you say "only male actors need apply"?
What about Othello? It is an intrinsic part of the character that he is black. Wouldn't you advertise only for black male actors unless you want to run the gauntlet of putting a white actor in blackface? (I saw the Orson Welles
Othello as part of my Eng. Lit. O Level and it was, frankly, embarrassing, even back in the 80's, even in black and white.)