When using <syntaxhighlight> the contents are visible in the apps' dark themes. However if the inline attribute is added then the tag is not styled the same way and the contents are not visible.
Test page: https://en.wikipedia.org/wiki/User:The_wub/T254672
This is used in Template:Code which is transcluded over 33000 times on English Wikipedia. I don't know how often it is used outside of that template.