I would base this decision just on actual safety considerations vs. the benefits of owning your own home. When you own (vs renting) you can have pets, you can change things in the environment to fit your families needs, you have security (no one is going to give you notice to move), etc.....
So, you will need to think hard about how much you think the actual safety is changing -- tough call.
I am not in the city here with problems, if I was, I would think seriously about moving( I am outside of city limits in the county). I actual did move based on these concerns, but it was in early to mid 2008 and I rented out my house here and rented in the location I thought I wanted to move to, so I could check out the concept without as much risk. I ended up coming back here for some personal reasons at the end of the school year (my ex was laid off, the whole world felt off with the whole 2008 crash). So we came back, and then we had an uptick in gang violence in the city here and I kept my youngest homeschooling and out of being bussed into the jr high and high school in this close city. So mostly, we stay away from the drug problem stuff, but we can mostly get away with this due to being out of town, the metric could easily be way different if I was in an area of this city that is experiencing home invasions (same like you described) to get money for drugs. The experience of renting in the other city was tough, I could not find a rental for a very long time that would allow a dog, and we have a dog. We ended up in an interesting rental because we have pets. I had to put up with energy inefficiencies that I couldt remedy, as it wasnt my house and I couldnt maek changes and I was worried at one point we would be given notice because the landlady decided we had too many cars parked there ( older 2 home from college for xmas break) so, renting is not a piece of cake either.