I had a similar experience. While following a group of cars on a yellow,
all cars ahead disappeared, so I kept my same speed, but when it went green
I got the black flag for passing on a caution. I checked the replay, and
sure enough, when the cars disappeared and then re-appeared I was ahead of
a couple of cars!