Thank you for the sample, that helps a lot. I think the problem is that you are changing the app theme to dark and that will make the control's Foreground (which ends up being the "plain text" foreground color) and Background (the text area background) go to dark theme colors. But everything else in the editor, like the indicator margin, modification marks, syntax highlighting is still geared for a light theme. That's why the indicator margin is still in a lighter color, and the modification mark is too bright.
What you're missing is logic like in our sample's UpdateHighlightingStyleRegistryForThemeChange method. That will try and update all the display item and other syntax highlighting styles for dark when a dark app theme is loaded. Please check that out.
Also we know that the updating of SyntaxEditor control theme for app theme changes is tedious right now, and we have a TODO item to work on improving and streamlining that process.