Many apparently don't; there are lots of examples of defendants of colour getting convicted in cases where white defendants get acquitted or receive a very light sentence.
Are the cases the same, or just the charges? Why did the defendant choose a jury trial as opposed to a bench trial if they believed the jury was going to be racist? What was the racial composition of the jury in both cases?
The story is usually a lot more complicated.
There also reverse cases of this too, because high-profile cases are usually dealt with more severely, not because of race. For example, a cop in Florida killed a 36 year old white man in very similar circumstances to George Floyd, and got off scot-free. So for better or worse, notoriety also comes into play.