More or less all the selectors listed here should be removed and replaced with the mw-no-invert classes being added directly:
https://github.com/wikimedia/mediawiki-extensions-DarkMode/blob/4d265fbfb987fb230ab61d736a2217cbcb7dda3a/resources/ext.DarkMode.less#L56-L67
See also T311835