One thing that might change your mind is the 20th century mythic cowboy. Where I’m from, maybe 1/4 cowboys were black. So we accepted that as whites-only theatre. Do we have to keep accepting whites-only theatre?
Option A: Take a story with a white cowboy, cast a black guy for him and shoot the movie.
Option B: Find a story of a black cowboy (and as you said there were many of them) and shoot a movie about it.
IMHO option A is patronizing while option B is empowering. Because option A assumes there were no black cowboys, there are no good stories too tell about black people.
And this is the right way to do things, and not by pity race swapping some famous character/historical figure.