Most anti-discrimination statutes make some allowance for "affirmative action" (though in legal terms it is often called "positive action" or "special measures"), which allows discrimination undertaken for the purpose of acheiving "substantive equality" between relevant classes of people. The rules for "positive action" in recruitment in the UK are set out in section 159 of the Equality Act 2010. That section provides as follows (here P would be the employer, A would be a person of the sex group they are favouring, and B would be a person of the sex group they are disfavouring):
(1) This section applies if a person (P) reasonably thinks that—
(a) persons who share a protected characteristic suffer a disadvantage connected to the characteristic, or
(b) participation in an activity by persons who share a protected characteristic is disproportionately low.
(2) Part 5 (work) does not prohibit P from taking action within subsection (3) with the aim of enabling or encouraging persons who share the protected characteristic to—
(a) overcome or minimise that disadvantage, or
(b) participate in that activity.
(3) That action is treating a person (A) more favourably in connection with recruitment or promotion than another person (B) because A has the protected characteristic but B does not.
(4) But subsection (2) applies only if—
(a) A is as qualified as B to be recruited or promoted,
(b) P does not have a policy of treating persons who share the protected characteristic more favourably in connection with recruitment or promotion than persons who do not share it, and
(c) taking the action in question is a proportionate means of achieving the aim referred to in subsection (2).
In your question you do not specify the details of the discrimination, or its purpose, but I am going to presume that this is a case where the employer is seeking to engage in affirmative action in favour of women by evaluating both sex groups seperately. Assuming that is the case, in order to fall within the ambit of "positive action" in recruitment within s 159 of the Act, the employer would need to establish that they satisfy points (1)-(4) above. For example, the employer might argue that they reasonably think that there is disproportionately low participation by women in that activity (e.g., the job or industry), and their use of seperate evaluation for men and women enables women to participate in the activity. Under subsection (4), they would need to establish that any women hired under this system are as qualified to be recruited as any of the men they turned down, and that their system is "proportionate" to acheive its aim.
The main legal danger for the employer in this case is if their list of women applicants that they interview ends up including someone who is not as qualified for the job as one of the male applicants who did not get an interview. If this were to occur, the excluded male candidate could complain of sex discrimination, and the employer would not meet the requirements of subsection (4) of the section. This is likely to lead to an argument over what it means for one person to be "more qualified" for the position than another.