The solution to that problem is to pregenerate tracking numbers that are then doled out by the remote system with intermittent connectivity. Or use a hierarchic numbering scheme.
A hierarchical numbering scheme is exactly the prefix system I just described. Pregenerating numbers still doesn’t solve the problem that the carrier doesn’t know when any given number goes from “generated, will be handed out someday” to “awaiting pickup.”