Many, if not most of the more famous cases of innocent black people being killed did not INVOLVE "resisting arrest".
Tamir Rice wasn't resisting arrest- He was a twelve year-old kid playing with a toy gun and, rather than making any effort to get him to stop, rather than even mentioning the possibility of arrest, the cops who showed up just wasted him on the spot.
Breonna Taylor wasn't resisting arrest- her house was invaded by cops in a no-knock raid while she and her boyfriend were sound asleep-the cops had the wrong address- and she was killed in the crossfire when her boyfriend, who had know way of knowing they were cops, fired back in what he had every reason to believe was a legitimate act of self-defense. Could they really not have at least shouted "police. Don't shoot" or something?
George Floyd, whatever else you can say about him, wasn't resisting arrest-he was already UNDER arrest and in handcuffs, thus he was already controlled and neutralized from being any sort of a threat, he was not apprehended for anything remotely close to violence- the man was approached for what appears to have been a trivial offense, probably just public drunkenness, andiit has now been proved that he was never trying to pass a counterfeit $20 bill- even if he had been, it's as likely as not he wouldn't have known it was counterfeit and even if he'd made the bill counterfeiting is not a capital offense in the City of Minneapolis, the State of Minnesota, or under federal law.
Philando Castile was not being put under arrest when he was shot-he was simply stopped for the minor offense of a busted tail light and the police sound recordings themselves prove that, at the time he was shot, Mr. Castile was doing everything he possibly could to cooperate with the officer who had pulled him over for, well, no real reason-does every WHITE driver with a busted tail light get pulled over? Of those who do, how many ever get shot?- and so was Philando's girlfriend, who was in the car, spoke politely and respectfully to the officer, but was kept at gunpoint by the officer even though it was obvious that she was no threat and that all she wanted to do was to apply pressure to Mr. Castile's gunshot wounds in order to keep him alive until medical assistance arrived- Mr. Castile, who, remember, had done nothing whatsoever to deserve to be shot, could have survived if the officer had immediately called an ambulance and allowed Mr. Castile's girlfriend to apply pressure to the wounds to stop the bleeding.
Trayvon Martin wasn't resisting arrest- George ZImmerman aggressively confronted Trayvon, who was simply walking home from a convenience store after buying late-night snacks, and all of this was happening in the neighborhood where Trayvon lived. George Zimmerman was not a cop, was told by his neighborhood watch dispatcher not to approach Trayvon...who again was simply walking to his own home with snacks, as he had just as much right to do in peace as any white kid who lived in that neighborhood-and had no reason or right to confront Trayvon at all. And if it had been a white kid walking by at exactly the same time, George Zimmerman would have left the kid alone.
To name only a few. Other readers can post more names on this theme than I know, and I hope they do.
So no, it isn't as simple as "don't resist arrest", and it's inappropriate to even use that phrase in cases like this where an arrest wasn't even happening. What's happening has never been about resisting arrest.
Also...no, a police officer does NOT always have an obligation to try and effect an arrest What the duty of the police officer is is to de-escalate the situation and, if at all possible, to end it without force or coercion. The point is to make sure whatever confrontational situation was happening is brought to a peaceful end with as little physical harm to anyone as possible.
And in many if not most cases, the police are put under far too much pressure to make arrests for the SAKE of making arrests. Too many towns and cities have arrest quotas for cops, which means that they often arrest people simply to reach an arbitrary number of arrests for the month. This is not only pointless, it is a waste of the time of the police themselves, since insisting that they arrest people for minor offenses-the discredited "broken windows" theory that has led to decades of police harassment of black and brown people over trivial violations of the law- does nothing to stop actual crimes like sexual assault and murder.