The United Federation is a reoccuring location in Sonic's World, loosely based upon the real world United States of America. It's capital is Central City.
Empire City is a location that is clearly based upon real world New York, an American city. Despite this, it is depicted in Sonic Unleashed (it's only appearance to date) as having an entirely different flag.
Now I'm not a vexillologist, but even if this is some kind of city-specific flag, the fact that Empire City is depicted under this flag on a global scale, alongside other locations clearly under their countries' flags, implies that Empire City is not a part of the United Federation, despite the real-world parallels.
This can be nothing but conjecture, but it seems the most intuitive (in universe... I'm aware they probably just forgot about the U.F. and/or its flag internally...) reason for this could be that Empire City is either a nation state, or perhaps part of separatist nation within the United Federation that has split off from it as a whole. The 'why' for this can only be guessed at, but it is worth noting the stress the United Federation must have undergone with the Robotnik Family apparently being based out of the country (at least at the time of Project Shadow).