Detecting and removing overlays

I’m looking at the performance of a number of websites, none of which I control. I’m particularly interested in Last Contentful Paint and Custom Hero Paint times.

Unfortunately, there are overlays on many of the sites I’m looking at, which kills the LCP algorithms.

I’m trying to detect overlays and remove them, in the hope of getting the LCP to work.

Does anyone have an experience doing this?
Could anyone suggest an approach that might work?
Does anyone have a working example of sendKeyPress using a document attribute they find during script execution?



I tend to work out what cookie or local storage entry the overlay is checking for and then add it via a WPT script, or inject JS