Also under the law, a police dog is an officer, an army dog is a soldier, a search and rescue dog is typically a fireman. Also, depending on the US state, and if it's in any other western country, animals have rights and injuring a dog is a criminal act, and when it's owned by a cop you can be sure as hell you'll be charged with animal abuse. If you're lucky, you won't be charged with both and won't be sued civilly by the officer in question for damaging property.
IMHO when a German Shepherd latches onto your arm and is attempting to force you to the ground, you do as it says. Also when there's a half-dozen cops (usually 1 for the dog team, and 2-4 cops called in for suspected drug possessions) shouting "Stay down, stay down! DO NOT FIGHT THE DOG!" then you do what they say.
Fighting the dog only does 1 of 2 things. 1st it angers the dog, which will mean it clamps down harder and will likely mean it breaks the skin (which it is trained not to do), which means any attempt to remove your arm can literally shred the muscle from your bone. 2nd if you're lucky and get free with your arm intact, running turns that highly trained dog into nothing more than a wolf, it will no longer bite your arm or try to pin you down, when it gets you it's likely to be going for the throat to kill you.