Have you had official notification of your role being at risk of redundancy? Is your's the only role being made redundant? How different is the so-called new role to yours? These are just a few of the questions you need to ask.
Need more detail, but if what your friend in HR has told you (unprofessionally), you could have an excellent case for SD based on both my case law and the one which my case was based on which was Mundie v Drysdale Brothers
Mrs Mundie was employed to carry out administrative duties for the respondent. She became pregnant and, at her suggestion another worker, Ms Kearney, was employed to undertake the administrative duties in Mundie's absence on maternity leave.
Kearney performed well and the respondent decided to make Mundie redundant, retaining Keaney to carry out administrative duties. Kearney claimed she had been unfairly dismissed and discriminated against on the grounds of her sex.
The employment tribunal agreed with Mundie. Had she not been on maternity leave Kearney would never have been appointed and the comparison between Mundie and Kearney would not have been made. Since the respondent still needed someone to undertake the administrative duties Mundie had been originally performing, the role was not redundant and it was held that Mundie had a statutory right to return to her role.
An employee absent from work on maternity leave has a statutory right to return to their role even where a temporary replacement has been appointed who performs better and there is only capacity for one employee to be retained.
I have a FB group called - STOP Pregnancy Discrimination in the Workplace. Pls join and message me. I will happily help you with any other advice you need and mail you the judgement from my case.