Why does my WordPress show a 404 message for 403 forbidden directories?

Thinking on it for a minute, I suppose it has something to do with the rewrite rules from the WP .htacces is kicking in and rewriting the request to WP. It doesn’t totally make sense to me, because WP’s rewrite rules actually ignore directories, and I cannot reproduce it with a quick test, but there might be other factors at play in your environment.

Adding

RewriteEngine On
RewriteRule ^restricted-dir - [F,L]

in the WP .htaccess before the WordPress Rewrite Rules should have the same result, denying access to restricted-dir with a 403 response.