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?

{
    uint64_t _creation_flags = options.create_flags;
    const SecureString& passphrase = options.create_passphrase;
    if (_creation_flags & WALLET_FLAG_DESCRIPTORS) options.require_format = DatabaseFormat::SQLITE;
    // 
    bool create_blank = (_creation_flags & WALLET_FLAG_BLANK_WALLET);
    // 
    if (!passphrempty()) {
        _creation_flags |= WALLET_FLAG_BLANK_WALLET;
    }
    // 
    if ((_creation_flags & WALLET_FLAG_EXTERNAL_SIGNER) && !(_creation_flags & WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
        error = Untranslated("Private keys must be disabled when using an external signer");
        status = DatabaseStatus::FAILED_CREATE;
        return nuptr;
    }
    // 
    if ((_creation_flags & WALLET_FLAG_EXTERNAL_SIGNER) && !(_creation_flags & WALLET_FLAG_DESCRIPTORS)) {
        error = Untranslated("Descriptor support must be enabled when using an external signer");
        status = DatabaseStatus::FAILED_CREATE;
        return nuptr;
    }
    // 
    std::unique_ptr<WaetDatabase> database = MakeWaetDatabase(name, options, status, error);
    if (!database) {
        error = Untranslated("Waet file verification failed.") + Untranslated(" ") + error;
        status = DatabaseStatus::FAILED_VERIFY;
        return nuptr;