I've seen this several times in the past few years.
While the cause of the error is the test, the actual error is overpayment of a distribution, which is addressed in EPCRS.
The participant should return the money (adjusted for earnings), and the 1099-R can be adjusted (if not issued yet) or amended to reflect the portion that was correctly refunded to the HCE.
If the participant refuses to return the money - and they would have been eligible for an inservice withdrawal ( typically over age 59 1/2) then basically the HCE has taken an in-service withdrawal of the extra $.
If the participant refuses to return the extra $ -well there are other threads on here about what to do when distributions are too much and how to try to recoup or next steps.
Presumably the forfeited match is still available, if not, the sponsor should make a deposit to the plan to cover the match that needs to be restored to the HCE's account.
I've seen all of this done as self-correction (which is a decent option if fixed all within the same year - minimizes tax impact). I've also seen this done as a VCP, which is good too.
Since the plan would have an annual IQPA I would also suggest checking with the auditor if they are the kind that are sticklers about things being done exactly their own way.
Good luck.