While I feel sure that the DWP has the legal right to demand an excess payment back, what you've been told appears to be consistent with this sentence on the Citizens Advice website:
"Sometimes they won’t ask you to pay them back if they know the overpayment was their fault"
https://www.citizensadvice.org.uk/benefits/help-if-on-a-low-income/income-support/income-support-appeals/if-the-dwp-says-youve-had-an-income-support-overpayment/
(That relates to Income Support be it would seem reasonable to assume that a similar policy operates for other benefit overpayments too).
If you've only been given the information verbally though, I'd definitely advise asking for it to be provided in writing as well.