The existence of black cops and their similar treatment of minorities does not eliminate the possibility of there being racism.
For example, there are documented cases of emancipated black slaves becoming slave owners themselves prior to the Civil War, some of whom were known to be at least as brutal with their slaves as their white peers.
I suspect it comes down to individuals identifying themselves as being part of a new tribe (e.g., cops), allowing them to treat members of their former tribe (by race) as "others". The degree to which they mistreat their former tribe likely stems from how their new tribe perceives the old one (i.e. many cops believe they are above "civilians" and especially minorities).
That is ultimately the core of racism.
This has been demonstrated repeatedly in simple classroom experiments where children are divided into two groups based upon some arbitrary characteristic (e.g., eye color, clothing, or even some new identifier passed out to them) and quickly displaying camaraderie within their own group while antagonizing members of the other group.
A lack of "being polite" does not justify state sanctioned extrajudicial punishment, as your victimhood narrative implies. Sure, be polite to cops because you should be polite in general until someone gives you a reason not to be. And from a social engineering standpoint you get better results by being friendly. But as a rule one should be able to be rude to police officers in any way one can be rude to any other citizen, and if they attack you for it they should be the ones going to jail, like any other citizen. Public employees tasked with upholding law and order need to be shining examples of it, not hypocritically exempt from it.