Submitting this because I dont have the time (or resources) to debug this atm and need a self-reminder:
On Win32 walletpassphrase does not appear to relock after the designated amount of time as it should and as it does on Linux.
Can someone check this on OSX as well?

if (fExisted && !fUpdate) return false;
        if (fExisted || IsMine(tx) || IsFromMe(tx))
        {
            /* Check if any keys in the  keypool that were supposed to be unused
             * have appeared in a new transaction.  so, remove those keys from the keypool.
             * This can happen when restoring an old  backup that does not contain
             * the mostly recently created transactions from newer versions of the .
             */
            // l
            for (const CTxOut& txout: tx.vout) {
                for (const auto& spk_man : GetScriptPubKeyMans(txout.scriptPubKey)) {
                    for (auto &dest : spk_man->MarkUnusedAddresses(txout.scriptPubKey)) {
                        // I
                        if (!dest.internal.has_value()) {
                            dest.internal = IsInternalScriptPubKeyMan(spk_man);
                        }
                        // s
                        if (!dest.internal.has_value()) continue;
                        // I
                        // (
                        // a
                        if (!*dest.internal && !FindAddressBookEntry(dest.dest, /* ase)) {
                            SetAddressBook(dest.dest, "", "receive");
                        }
                    }
                }
            }
            // B
            // w
            TxState tx_state = std::visit([](auto&& s) -> TxState { return s; }, state);