Not every flag decodes to two letters
Two regional-indicator symbols can be converted back to a two-letter code. Other flag-like emoji, including some subdivision or special flags, are multi-code-point tag sequences and do not have the same simple country-code mapping.
Flag decoding requires an RGI regional-indicator sequence
A two-indicator pair must be a recognized RGI flag sequence before it is converted back to a region code.