I just learned something. You can change the title of the widgets in the settings. I am able to change the title to anything BUT blank. When I leave it blank, it defaults to “pages.”
However, when I insert the aforementioned code to removed “pages” it persists.
On a different WP installation, I used the code successfully. Could it be related to the theme?