https://medium.com/@teedrockwell/the-privileged-access-of-the-underprivileged-91473fe6e7a8
For more on this issue see the above article.
I like to use an analogy between laboratory physics and theoretical physics. If you are a laboratory physicist, you have actually experienced some of the facts that form the basis of physics. But if you are a theoretical physicist, you have to rely on reading papers written by laboratory physicists. And yet many great physicists have done little or no laboratory work of their own. Similarly a member of a marginalized group has direct access to experience that can give them a unique advantage, if they have good writing chops. But ultimately that advantage doesn't entitle a single member of a marginalized community to speak for all members of that community. Similarly even laboratory physicists have to read about other experiments to do good science.
Of course literature values uniqueness in ways that science cannot, because science wants knowledge that applies to everything. But ultimately to be a good writer you usually have to take other people's experiences into consideration. That means every good writer has to write outside of their own experience, and in that respect the privileged and the marginalized writer have an equal right and obligation to write about other identity groups.