This often occurs where the employee fails to timely establish the HSA with the employer’s designated custodian. It's frequently because the employee has not completed the Customer Identification Program (CIP) to satisfy requirements set forth in the USA Patriot Act.
Here's a short summary on how to handle--
https://www.newfront.com/blog/employee-fails-to-establish-hsa-2
Best practice is to have a consistent policy in place to address situations for both active and terminated employees who do not take the steps required to open the HSA with the employer’s custodian.
Employee HSA Contributions
For employee HSA contributions, the employer must either deposit or return the employee’s salary reductions. Any reasonable administrative policy would be fine here. For example, failure to open the account within 90 days (or during the period of employment, if sooner) will result in a refund to the employee in the following payroll. That avoids the need to hold and potentially refund large amounts of employee contributions. Remember that any refund must be taxable income subject to withholding and payroll taxes.
Employer HSA Contributions
For employer HSA contributions, it is reasonable to have a consistent administrative policy providing that employees forfeit the employer contribution if they fail to timely open the account. For example, there will be no retro contributions beyond the last day of February of the following year. And if the account isn’t opened during the period of employment, all employer contributions are forfeited. The employer should provide employees with advance notice of the consequences of failing to timely establish the HSA.
Note that although IRS guidance does not directly address these types of policies generally, there are provisions in the comparability rules providing that employers may have a policy for employees to forfeit the employer contribution if they do not establish the HSA within a set period. Although most employers are not subject to the comparability rules (in almost all cases the Section 125 nondiscrimination rules apply instead), this provision at least provides a basis for the IRS approval of this type of approach generally.