I definitely see an issue with this. Fortunately, at least GitHub is readable without running non-free code and is searchable. I guess you can also participate with one of those alternative clients.
You are still not in control of your community, and I'd like this monopoly to vanish.
Not really. GitHub is also "readable" through a search engine, and can be used (read-only) without signing in. GitHub also allows you to use automated tools to read and manipulate the data stored there. Discord does not allow you to do any of those things.
It is more of the content inside GitHub is widely accessible without needing to log in whereas Discord are not really accessible and often would need "invitation link" to find those servers. GitHub is far more public in this sense than Discord is. Discord/Slack is a instant message system, far different, than forums style which are "static", which make archival extremely difficult to do in Discord/Slack.
Probably because you're nowhere near as "locked-in" to GH. You can move your source code and all of its history to another hosting platform in minutes with git.
If you want to move your Slack/Discord community to another platform, there is no easy way to export the content AFAIK.
Not true. Good luck exporting the issues, pull requests, comments, discussions, wikis, etc. and bringing those to another platform.
Ironically (and I am not defending them), Slack[0] is the only one of the three that has an official way to export all messages. GitHub does not, unless you're counting their API, but then maybe you want to consider Discord things like this[1]?