I haven't verified it, but I have noticed that Brave only does the "darkmode" in cases where it thinks it's needed. So my guess was the meta tags, or it has some smartness in checking pixels?
Discussion
my guess is its checking pixels but could be wrong, i'm no expert. if you allowed websites to turn off dark mode by adding a meta tag it would allow websites to override users preference to see it in dark mode.