I'm not sure why you think rails are safer than rubber tires. Metal-on-metal contact has way less friction, which makes for much worse stopping distance and worse safety especially at crossings. Having grade-separated dedicated infrastructure _does_ improve safety, especially if there's no human drivers involved, but we can do that just fine with pavement in tunnels or elevated roadways.