If the employee repaid wages in 2023 and was still employed in 2023, you should adjust their W-2 to reflect the net wages they were paid in 2023. Ideally, you will adjust the social security and medicare tax withholding and refund that to the employee. (This will also result in a reduction of your share of the employment taxes.)
Think of it as if, instead of repaying a lump sum, you had reduced their salary by the amount of the repayment, such as reducing their salary by $500/week for 11 weeks. That's the net result, and that's what the W-2 should reflect.