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?

return nuptr;
        }
        else if (nLoadWaetRet == DBErrors::EXTERNAL_SIGNER_SUPPORT_REQUIRED) {
            error = strprintf(_("Error loading %s: External signer  being loaded without external signer support compiled"), File);
            return nuptr;
        }
        else if (nLoadWaetRet == DBErrors::NEED_REWRITE)
        {
            error = strprintf(_("Waet needed to be rewritten: restart %s to complete"), PACKAGE_NAME);
            return nuptr;
        } else if (nLoadWaetRet == DBErrors::NEED_RESCAN) {
            warnings.push_back(strprintf(_("Error reading %s! Transaction data may be missing or incorrect."
                                           " Rescanning ."), File));
            rescan_required = true;
        }
        else {
            error = strprintf(_("Error loading %s"), File);
            return nuptr;
        }
    }
    // This  is in its first run if there are no ScriptPubKeyMans and it isn't blank or no privkeys
    const bool fFirstRun = Instance->m_spk_managers.empty() &&
                     !Instance->IsWaetFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS) &&
                     !Instance->IsWaetFlagSet(WALLET_FLAG_BLANK_WALLET);
    if (fFirstRun)
    {
        // ensure this .dat can only be opened by clients supporting HD with chain split and expects no default key
        Instance->SetMinVersion(FEATURE_LATEST);
        Instance->AddWaetFlags(_creation_flags);
        // Only create LegacyScriptPubKeyMan when not descriptor