When using headers in dark mode, text in headers is set as a white or near-white colour. However, due to the fact notes have a default background of a cream/pale yellow, same as light mode, this makes them essentially illegible.
A good way to see this is to go into Dark Mode and look at something like post #8462858 which uses headers in it's title. The only solution in-system is to declare a colour span in the midst of each header, which is a PITA.
This is probably because, at least in dark mode, a lot of body text is light grey, while header text is whiter. presumably, the same formatting used for headers in other text is inherited by notes, causing them to pick up the colours.
Updated