If an area of your gang territory is under attack and you don't want to fight them off, just go to a safe house and save your game, and you'll keep the area.

Need to access a safe house/fast food restraunt/etc. but don't want to deal with an enemy gang hanging out near it? Try driving around a block or two and then come back. They might not be around. This might help if you're low on health and concerned about getting wasted if they shoot at you.