Yep. I had the same problem (but on Vue project). It can be easily worked around, though.
When you go and check page source of https://ggather.com - you can see one of the first scripts (before main bundle) is a script that checks localStorage and applies CSS class.
It works pretty good, it's fast enough and there's no any visible flash of light theme.
This however works only if user previously enabled dark theme in the webapp.
So another way could be potentially using prefers-color-scheme media query and also including it outside of the main bundle.
I run 2 websites (ggather.com and workaline.com) that make heavy use of scraping, and it's not that big of a problem. From my experience majority of websites either don't have scraping protection or they have it loose enough that it doesn't make problems. For the remaining websites I'd probably use some proxy service that rotates/changes the IPs frequently.
​
Even news sites that block content behind paywall, etc. often have properly configured meta/open graph tags which allow to properly scrape basic information about page.
​
For my use, the bigger problem than scraping protection were pages that needed some confirmation to view content (e.g. reddit 18+ subreddits) or those that don't have properly configured meta/open graph tags.
​
​
​