We need to fix the problem from the bottom up, and this solution is a top-down one.
What I mean is, the lack of non-white, non-straight, non-male, non-working class, non-Western, etc. authors is a problem but the only way it can be addressed is by publishing more women, more non-white, more working class, queer, non-Western authors.
Banning straight middle class white men from writing about anything other than straight middle class white men would do absolutely nothing except increase the number of books written about straight middle-class white men. The media industry for the most part don't actually care. If white men stopped writing WoC, they wouldn't go "OMG get me some WoC authors asap, we can't live without WoC characters!" I know plenty of publishers and production companies who are run by men with zero interest in stories other than ones about middle-class straight white men. You have to work like hell to get something with a female lead (other than rom-com/chicklit) or something with a non-white lead commissioned. It's genuinely terrifying, the active resistance to it.
Alexander McCall Smith probably had to climb a mountain to convince a publisher to take a chance on a book with a black African female lead character. And this absolutely sucks, but if McCall Smith had been an African woman he'd probably have never got within 50 feet of that publisher in the first place. If those books hadn't been published, they wouldn't have gone out and published a book actually written by by an African woman instead. They'd have published yet another Will Self wannabe or something.
The only solution really is for those of us who care about diversity to try to keep plugging away, getting our own work out there, and doing what we can to help others do likewise. And wait for the old white man brigade to die off I guess?