Sankey text is not visible using dark mode.
Check your example on https://plotly.com/python/sankey-diagram/
The default font color is black, with small background borders white. When the text is displayed on top of the black background, it is an example of a user challenge to read the content of the items.
Suggestion to change the dark mode defaults or propose a workaround for people to change the font/background color to something readable over the dark backgrounds.