There is no Github dark mode in the preview with github_document() . You would need to make a special theme using html_document() close to your Github look.
This would need to be a feature request for rmarkdown. You could even submit a PR with some change for us to review, or someone else.