What is the folder structure and .htaccess files related to your folder structure?
Example:
My WordPress site is a root installation here: /website-root-folder or my site is a subfolder installation /my-wordpress-site-subfolder.
My password protected folder is here: /some-folder
htaccess files related to this structure are:
There is an .htaccess file is in the website root folder which affects subfolders recursively so it will affect and/or override my password protected directory .htaccess file.
This is the most common problem scenario above and to fix problems with password protected .htaccess file is to add ErrorDocument 401 default to your root .htaccess file.
ErrorDocument 400 /wp-content/plugins/bulletproof-security/400.php
ErrorDocument 401 default
ErrorDocument 403 /wp-content/plugins/bulletproof-security/403.php
ErrorDocument 404 /404.php