Thank you!
I cannot comment on if COPR# gets generated even when applicant is rejected as it is something internal to IRCC.
But, thinking logically, if the application is rejected, it happens during evaluation(A11.2) or during BG(usually, but not always). System cannot generate a COPR# unless...