How does ignoring the first retreat flag work?
Quite literally, ignoring the first flag means that flag is a &quot;no effect.&quot; It is measured per roll.
So, in order to force a retreat, an  a sandbagged unit or unit in a bunker that ignores a flag must have two or more flags rolled against it in order to force its retreat (or additional hits if it can't retreat).
Support for this view is in Richard Borg's FAQ dated 4/15/05

Q. For artillery in bunkers, flags are treated as a hit. Do they still ignore the first flag?
A. Yes, Bunkers (page 16)
Basically an artillery unit in a bunker may not retreat. Therefore it must lose one figure for each
retreat move that cannot be completed. But like all other units in a bunker hex, it may ignore the
first flag rolled against it. In other words, it takes two flags to make one hit, and three flags to make
two hits.

Note that the bunker allows ignoring the first flag... but artillery can not retreat from a bunker, so flags on bunkered arty are hits, not retreats.