Sometimes they have problems bringing in armed white people: https://www.wdtv.com/2022/07/07/armed-man-shot-by-officers-raleigh-county-identified/
Sometimes they kill white unarmed people who didn't shoot at police: https://laist.com/news/unarmed-david-sullivan-killed-buena-park-police-da-reopen-case.
Sometimes they bring in armed black mass shooters who shot at police: https://www.usatoday.com/story/news/nation/2021/02/03/oklahoma-shooting-muskogee-paralyzed-grief-after-6-shot-deadl/4369370001/.
Your sweeping generalizations aren't accurate. The trends are certainly damning, but "this happens, that doesn't" as you've stated it is just false.
(Edit: here's a decent if slightly old analysis--https://www.thepublicdiscourse.com/2020/06/65309/)