If a region is occupied/annexed by foreign troops, they would still be considered loyal to their original realm, not sympathetic.
But given all the different permutations of how regions can be taken and retaken, there's no way the game can accurately model this. Thus, Loyalty is to your own realm, and Sympathy is to all other realms.