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?

{
    //  -changetype is specified, always use that change type.
    if (change_type) {
        return *change_type;
    }
    // if m_default_address_type is legacy, use legacy address as change.
    if (m_default_address_type == OutputType::LEGACY) {
        return OutputType::LEGACY;
    }
    bool any_tr{false};
    bool any_wpkh{false};
    bool any_sh{false};
    bool any_pkh{false};
    for (const auto& recipient : vecSend) {
        std::vector<std::vector<uint8_t>> dummy;
        const TxoutType type{Solver(recipient.scriptPubKey, dummy)};
        if (type == TxoutType::WITNESS_V1_TAPROOT) {
            any_tr = true;
        } else if (type == TxoutType::WITNESS_V0_KEYHASH) {
            any_wpkh = true;