More than 5.6 million people overpaid tax in the 2023/24 financial year, new figures from HMRC reveal.