Hi @timjastley,
You'll need to run your payroll with the rollback so you can enter the leave date of your employee. This way, you can generate and then submit your P45 form showing the correct details you need. You'll also need to contact the HMRC to confirm if the FPS you've submitted has been processed.
As always, you can visit our Payroll Hub page for QuickBooks Online if in case you need some guidance when processing your payroll.
I'll be always around here in the Community keeping an eye for your response and ready to help if you have any other questions.