I’ve never heard of it either, it may be awkward but speaking to your HR/Payroll would probably be best, unless you’ve got it written in your contract anywhere!
I don’t see why you can’t use your AL to pay it. You are entitled to that pay so if you handed in your notice before you had a chance to use your AL, they will have to pay you. They also can’t make you end your Mat leave early to use your holiday. I would say it would be best to speak to HR and ask them about it. but if you wanted to try your luck, you could always speak to HR about the reasons why you don’t want to return and see if they will allow you to leave without paying the enhanced pay back. It will be cheaper for them then you taking them to court around unfair/ discrimination etc pregnancies related.
I'd call Acas to ask this, although I've never heard of being able to do this before tbh.