Many apps refreshes when switching between light and dark colors, this is set by the app itself, to fix dark color switching not refreshing you need to contact YouTube these developers to fix their app.
Or you can prevent them from switching, change the app settings to not follow the system's dark color mode.