That's likely also the case, but aside from the melanin-vitamin-d angle, there's been some work suggesting a genetic susceptibility to covid for people with significant recent SSA ancestry.
On the other hand it seems a major genetic risk factor for COVID-19 is inherited from Neanderthals, and that should be less common among Sub-Saharan Africans.
https://www.nature.com/articles/s41586-020-2818-3