Right, here's my tuppence worth.
An employee who is on maternity leave accrues holiday in the normal way. However, IMO it is also lawful to subject you to the normal holiday leave rules. This means that, if you cannot carry holiday over from one year to another, you need to take it at the start of the maternity leave period if your leave will go over a year end. I do not think that there is a separate right to carry over holiday just because you have been on leave. I also don't think that it is discrimination to subject an employee to the same holiday rules as everyone else.
There is also the complicating question that the employer is not allowed to let you carry over the holiday under the working time regulations during employment. Even though the OP's employment has now ended, at the time of the carry over she would have been an employee and subject to these rules.
SO I think it is actually fair enough to say that untaken holiday is lost as a matter of law. It would be your responsibility as an employee to make sure that, if your maternity leave planned to go over a holiday year end, you took the leave before you went.
I think it is different if you are prevented from taking holiday. Then, everything Flowery has said about preventing people from taking leave would apply. I won't repeat it all cos I agree .
Having said all of that, most employers would either:
(a) make sure that you knew the rule so that you made sure you took your leave; or
(b) let you be paid out/carry the holiday over (yes, breach of the working time regs, but if you both agree to break a law and it benefits the employee to do so, who is going to to sue?).
There are also some glitches now that maternity and holiday leave are both longer. For example, an employee who went on leave on the 1st of Jan and came back on the 1st of Jan the following year wouldn't actually have had any days in the holiday year to take her leave!
I won't pretend that this is a definitive answer. There are lots of interpretations, but it's how I would reason it personally...