Discovered on a 3rd party plugin, but this is a Figma limitation.
My team uses the Writer plugin to test content for compliance with our style guide. The plugin scans hidden layers and cannot exclude them due to limitations on the Figma side.
Idea: Enable 3rd party plugins to include/exclude hidden layers.