Tactically, it's practical to take the battle to the police once the jig is up. Fleeing isn't really an option, as that just gives able bodies time to call in roadblocks, helicopter, shoot the suspects in the back, etc. It's better to incapacitate the first responders as quickly as possible, then make a getaway. Only problem (but not really, since it's a game and repetition is part of the package) is that criminals would not get themselves into such situations after surviving the first. They would keep as low a profile as possible, possibly flee to a non-extradition treaty country.
When the choice is between jail/death or freedom, police become mere obstacles, armed agressors, to a lawbreaker. Michael was a bank robber, it's plausible that he has no quams about killing police, who he would see as equals and opposition to his interests. Kidnapping someone's wife isn't in the same ethical ballpark, as she is not an equal participant in the game of violence.
Franklin going from repo man to cop killer is harder to swallow. But he's also a banger, and bangers have a notorious lack of empathy for law enforcement.
Trevor is a psychopath who acts outside the bounds of criminal codes. It is plausible that Michael and Trevor would find some of his acts beyond the pale, but fighting police is within the bounaries of those codes.
It think it is a stretch to expect criminals, who are ultimately selfish and anti-social no matter how relatively mild they may be, to give any consideration to the well being of police, beyond assessing the risk-reward of removing immediate obstacles vs. severe criminal charges if unsuccessful.
Ultimately, the universe is indifferent to man and his codes, rules, and laws. Everyone is fair game once they draw their guns.
P.S. Keep in mind, these games love to emulate the shootout scene from Heat, but because of the demands of the video game medium, they can't supply the same context. The bank robbery in Heat was a botched job, otherwise DeNiro's team -who were more stone-cold than the guys in GTA5- would never get themselves into that kind of situation, and certainly wouldn't keep repeating it over and over.