The amount of armchair Lawyers on here is quite disturbing, and what is even more disturbing is the wholly inaccurate advice, in which, perpetuates Employers evading accountability.
Your claim in an employment tribunal will 100% be well-founded. The "baby brain" comment alone will contravene various differents Acts spanning across the Equality Act 2010, namely Sex Discrimination, Indirect Discrimination, and Unfavourable Treatment relating to sex.
Maternity, childcare are protected sex characteristics which are robustly protected under the Equality Act 2010 and the reasoning behind it is multi-faceted, one being that employers remove the barrier to work for females to bring the opportunities up to that of their male peers, to allow women to work and keep them in the work force.
The flexible working request is a blanket right for all employees, in which the employer doesn't have to grant the request (albeit more robust legislation is due to take effect in favour of the employee).
For working mothers, the flexible working request also captures the benefit of The Equality Act, given them iron-clad rights to a flexible working arrangement.
To the poster who also stated "You would have to prove discrimination", you are 100% incorrect.
Under Employment Law, the burden of proof lays with the employee to only simply present his/her claim. The burden then shifts back to the employer to prove they didn't discriminate. In this case, the comments, along with their lack of evidence to demonstrate why the role can only be conducted from the office, is a pretty slam dunk loss for them in court.
I do wish people would stop proffering shoddy and harmful advice, when clearly they have zero insight.