For this purpose, I use Login rebuilder.
Install plugin, go to the setting page of the plugin, follow the instruction to create new log in file.
You have to be careful about the file can be removed if you user composer update to update wordpress core.
After the preparation of the file, in setting page, choose working instead of preparation.
logging should be on, too.
Access to author page should be 404 status