I’m convinced the Weapon didn’t actually succeed at locking down Cortana, and instead Cortana locked down the Weapon.
The most obvious evidence of this is that the Weapon by her own admission was trapped in one room with the Cylixes for six months, while Cortana was in control of the Halo right up until she blew part of it up in her efforts to prevent the Banished from being able to fire it.
I believe Cortana’s experience enabled her to outmatch the Weapon, locking her down and removing a piece of her code, preventing the Weapon from being able to free herself, or even knowing that she needed to escape. No one deleted Cortana, and she wasn’t locked down (at least not fully) when she blew up part of the Halo, meaning she’s almost certainly still alive. Cortana not being deleted explains why the Weapon’s self-deletion didn’t carry out.
I think the full holographic messages shown to the Chief throughout the Campaign are the messages Cortana prepped for him before she blew part of the Halo apart. But the whispers might be Cortana trying to communicate with the Chief as she currently is. If this is correct, it would suggest that Cortana underwent a change after the explosion.
My guess is that Cortana was significantly damaged in the explosion, but survived, surprising her. She then used the Weapon’s code to repair herself, at least partially. I think this helped rectify the piece of her she lost at the end of Halo 4, restoring her capacity for empathy.
The whispers of Cortana plead for forgiveness, express gratitude for all Chief has done for her, and even expresses fear that she’s going mad again. Cortana also waxes poetic, something she never did before, suggesting that the influence of the Logic Plague is not gone from her.
I’m convinced that Cortana is the one opening portals and is the unknown sources helping the Weapon through the campaign.