On the bench where they worked, you used the same AC transformer and the same bridge-rectifier? Trying to find out what's different between the bench and track.
Some thoughts.
1. The link says 12V DC. I did not see a range of operation like 9V-18V DC.
2. Flashing LEDs incorporate solid-state circuitry which amounts to a timing circuit. Timing circuits like to be fed with a stable/constant DC supply. If all you use is a bridge-rectifier (no capacitor) to supply the DC from AC track voltage, you effectively have pulsed DC which drops to 0 Volts 120 times per second. This may confound the timing circuit.
3. If I understand your comment, it's when the caboose is "running behind a train" that there is no flashing. Does this mean it flashes when the train is stopped? This ties in with above comment where dirty wheels/rollers/track might be supplying intermittent or choppy track voltage making the DC voltage (after the rectifier) that much less stable.