Just turn it off for Messenger, it has it's own dark mode. Also FYI:
"[ DON'T REPORT THESE TO US ]
* Dark/Night mode: Do NOT report ANY issues regarding this! This feature is officially under development and is not fully stable! We have no control over how it behaves and how it looks! Dark mode on Android Nougat and Oreo does NOT apply to the Settings app. Nothing to be done about it. If Dark mode switches on by itself, it is caused by apps with in-app Dark mode, like Google Messages."