Contrarily to the TEMPLATE editor, it seems that inside the POST editor we can’t use the .dark class in custom CSS or global stylesheets:
Here, in dark mode, filter is not applied.
But when I remove the .dark class, the filter is correctly applied.
What is strange is that the .dark class DOES EXIST (set on .edit-post-visual-editor element).
So maybe some CSS/SCSS processing somehow is altering the rule…?