The answer is simple but the politically correct establishment will never admit it.
It begins and ends with caring and involved parents who are willing to administer ‘tough love’ on their kids, including behavior modification.
It’s the family, stupid!
It’s the parents and the teachers. It seems neither is really committed to the kids education. A good comparison is private schools. Look at the teachers and the parents. Both are committed. Also look at the discipline in private schools. There is little give and take regarding discipline. Either a student conforms or leaves. I was in private schools until I hit high school. I convinced my parents to let me go to a public high school that all my friends attended. It was a great school but I skated by for two years because I was that far ahead of them. No unions also in private schools.