First... as for why Inventor chooses the face that it chooses as side-A? I know that it almost always chooses the smallest face, but WHY? who knows... im sure they cant even explain it..
Second, in this case you are choosing (or having Inventor choose) the "A" side prior to making the extrusion/cut.. making a cut that separates a single face (Face0 is now buried & non-existent...and is now Face1-Face100) so a new Face has to be selected and you're forcing Inventor to determine the new A-Side... and as discussed, that's a risky business... the same reason you put all the connecting tabs in the folded-part, the flat-pattern will only bring up a single face and since there is no connecting tab in the 0, it has to discard all other faces... but obviously you already know that since you are removing the tabs in the flat pattern... I cant see your code, but I would make sure that when the user selects the face, it is prior to the extrusion... However if your intent is what I THINK it is, you want this to be modifiable and reusable.. In that case, when you create new faces, Side-A must be reassigned and back to square 1.
Third, you can also get there by changing the extrude to an emboss/engrave(not thru) but your flat pattern would have the inside faces. or maybe consider a stencil text.
Last, I assume this is being cut out on a laser, waterjet or some cnc operated machine and in most cases can utilize text layers as either etch or cut... if so, you can just add the text rule to the flat pattern and make sure text layers are on for exporting.