The railroad industry has gone to great lengths over the years to improve safety. Grade crossings are the one area where they are practically at wits end, because it’s the one part of the rail system where they are forced to interact with an increasingly incompetent driving public.
They are harder to circumvent - you cannot enter after the gates are down unless you actually leave the roadway.
I used to live a block and a half from one, and people WOULD still try to squeeze through. You can't claim it happened due to inattention, though.
Downside is that they are outrageously expensive.
“...where they are forced to interact with an increasingly incompetent driving public”
I’m having the same problem