CHMAC_SHA256 and CHMAC_SHA512 do not wipe their two hasher objects when they are destroyed. After Finalize() these still hold the HMAC output and the last bytes of the message, so CExtKey::SetSeed() leaves the seed and the master key behind, and BIP32Hash() for a hardened child leaves the parent private key. CreateMuSig2PartialSig() also leaves a secp256k1_keypair, which contains the secret key, on the stack.
I add destructors to both HMAC classes that memory_cleanse() the two hashers, following #35254, which cleansed rkey and temp in the same files. The MuSig2 keypair now comes from CKey::ComputeKeyPair(), which keeps it in secure memory. I checked with a small program, built from these files, that the seed and key bytes are in the HMAC object after Finalize() and gone after its destructor.