DWP SEND A P45 If You Have Failed
The issuing of a P45 is automated - it's just one of the things the computer does when a claim is closed. However, an ESA claim should not generally be closed until the statutory 28 days period for appeal has passed. A failed WCA decision is entered, payment stops, and the claim should remain open but not in payment. A case control is set for 28 days, and if no appeal is received, only then should the claim be closed.
This is because of a system limitation that means it's not possible to reopen a closed ESA claim - it must be deleted and rebuilt from scratch. No-one in the ESA processing section wants to do that: it's an annoyance and a lot of work.
As long as the GL24/appeal letter was received at the processing office within 28 days of the date of the notification of the decision to close the claim, there should be no problem, and this should probably be seen as a technical issue. Perhaps someone overzealously closed the claim, or entered the wrong decision, or...I can think of many ways such a thing could happen. But it's not significant of anything, really - if the appeal was received within the time frame, it becomes the DWP's problem to fix the mistake.
Call the DWP and ask what's going on, but on the face of it, I don't see this as a serious issue.