Hi hlnburton,
Recovery of an unintentional overpayment of salary, which occupational maternity pay is classed as, is from the difference in net pay, this is irrespective of whether it is for the current or previous tax year. Once the repayment has been agreed and proper arrangements are in place to recover this, and evidence kept to demonstrate how the recovery was made or is being made then the employer can adjust the RTI information. More information can be found at
1.19 of CWG 2 https://www.gov.uk/government/publications/cwg2-further-guide-to-paye-and-national-insurance-contributions/2022-to-2023-employer-further-guide-to-paye-and-national-insurance-contributionsat
Thank you.