I found a fix that works for me. The code that Wordfence adds to the htaccess was enclosed in an IfModule statement. When I removed that IfModule statement so it was just php_value then it works.
I’m having the same problem where the configuration message won’t go away despite having the correct code in .htaccess and php.ini.