Other Parts Discussed in Thread: SIMPLELINK-CC13X2-26X2-SDK
You indicated in the related thread that "Rejoin Requests are encrypted messages,".
Figure 2.106 of the Zigbee Specification 05-3474-21 suggests an unsecured Rejoin request in Intra-PAN portability.
ZED operation is detailed in "2.5.4.5.5 ZigBee End Device", also for Intra-PAN portability.
Section 4.6.3.1 also talks about joining a secured network:
"The joiner device shall decide which PAN to join and shall issue the NLME-JOIN.request primitive to join 11239 that PAN. If the joiner already has a network key for this PAN, the SecurityEnable parameter for the NLME-JOIN.request primitive shall be set to TRUE; otherwise it shall be set to FALSE. As shown in Fig11241 ure 4.26, the NLME-JOIN.request primitive causes an association request or rejoin request command to be sent to the router."
So it seems that the (re)JOIN request should not be secure if the PAN is different from the original one. When the Coordinator has been reinitialised, its PAN has likely changed, so the ZED should not attempt a rejoin using NLME encryption, but rejoin unencrypted.
That would enable the coordinator to issue a leave request.
The IEEE address of the coordinator allows the ZED to filter out irrelevant coordinators.
So in this perspective, should the ZED have issued an unsecure rejoin request in the coordinator? That would resolve the consequences of a reinitialised coordinator automatically.