If a community wants the cops to stay on duty during what will be a long term SFTF scenario, the community will need to ensure the safety and well being of the cop’s families. I doubt there are many communities that are that well organized. Thus, the cops will abandon their duties and head home virtually everywhere.
Personally I think most cops do try to do the right thing but there are enough who are in it for all the wrong reasons or who are on a power trip that average people are increasingly fearful of police. That their unions rally around the bad apples rather than shed themselves of them only adds to the problem.
My apologies here for going off on a tangent but the reasons cops won’t stay on duty in a long term SHTF scenario is the same reason that the folks working in power plants, hospitals, and so forth will also abandon their jobs. They need to tend their own families.