As I understand it, this is a very grey area. It may partly depend on how your holiday year coincides with your maternity leave.
If you contract is silent on this, then you are entitled to your statutory rights.
If you work full time, then you are entitled to 28 days off per year. Your employer can set the holiday year, and is entitled to tell you to take certain days off as holiday. Therefore, an employer is entitled to give you 20 days holiday to take whenever, and then the 8 statutory bank holidays on top.
Your employer is not entitled to tell you to take holiday during your maternity leave. You do continue to accrue your (statutory)holiday during your maternity leave.
However, if, for example, your holiday year ran June - July, you were contractually entitled to 25 days plus bank holidays per year, and your maternity leave ran Jan - Dec, then as each June - July holiday year would contain at least 3 bank holidays that you were at work for, then you would still get your 28 days in each holiday year, and your employer need not give you the bank holidays that fell within your maternity leave.
In my experience, HR departments are not very clued up on this sort of thing!