There are some poorly designed and marked crossing out there. I got caught on one in Indiana in December. There were two sets of main line tracks running parallel to each other with a total of 4 tracks. The tracks were running east-west. I was on a road driving south. There are a set of gates on the north side of both sets of tracks, and a set of gates on the south side of the tracks. I had just crossed the first set of tracks when the lights started flashing and the gates went down. It was possible for me to continue driving south to cross the second set of tracks but trees blocked my vision. There was room between both sets of tracks for two or three cars to stop and wait safely. I stopped and waited. My GF was freaked out. I explained that we were save because we were clear of both sets of tracks. I also explained that I was not about to cross tracks with the lights flashing because I could not see where the train was and I explained the thought process of expect a train on any track in any direction at any time. A freight train passed at about 60 mph on the tracks behind us. It was clear ahead, so I could have proceeded if I wanted to. I waited for the freight to pass, and the gates to go up, before proceeding. I looked carefully as I crossed the second set of tracks. My railfan knowledge protected us.
It is quite possible to "do most things right" and still get hit by a train at that crossing. Once the gates go down for one set of tracks, it is not possible to know if a train is approaching on the second set of tracks. Somebody in my situation could have easily pulled forward to cross the second set of tracks after they saw the first train behind them, and then be hit by an approaching train on the second set of tracks.