That might be true in some cases. In some cities there are some schools that are pretty locked down, more to keep out gangs and drug dealing etc. than school shooters.
But generally speaking that isn't true. A lot of urban schools are older and were built in an era long before school security was a primary concern. In my current job I don't do full time teaching at one school anymore. I do long-term subbing in two different school districts across Vancouver which includes some very inner city/diverse schools and some wealthier suburban ones. So I bounce around to a lot of different schools. All last spring I was teaching chemistry at a fairly urban majority/minority school that was built in the late 1960s with most of the classrooms opening directly out to exterior breezeways so it was literally impossible to lock the school down or even secure it in any reasonable fashion. They had over 100 exterior classroom doors at that school. Anyone could basically walk off the street and directly into any classroom. There was security of course, driving aroud in their golf carts, but they couldn't possibly keep track of all the kids, parents, staff constantly coming and going.
By contrast, most newer suburban schools are built with security in mind. So they are sitting on big suburban lots and students/visitors are funneled into just one or two entrances, all visitors have their IDs scanned, get visitors passes, etc. And the hallways are generally long and straight radiating out from a central point so that one or two security guards can basically see most of the school. So it is much easier to lock them down and locate a shooter. There aren't all the endless stairwells, corridors, and quirky hidden corners that you find in older schools.
Any school built in the past 10-20 years is going to be designed with security as one of the design considerations. A lot of older schools (which are more common in inner cities) were never designed that way and it can be impossible to do much to fix them up short of just bulldozing them and starting fresh with new buildings. Which most urban school districts don't have the funds to do.

