This is one of the most interesting issues in professional sports, world wide. No other sport is as balanced between club and country like soccer. For baseball, football (American) and basketball the teams are typically the first priority. In the other Olympic sports like Track and swimming, the top priority is National performance.
However, this is ultimately the players' choice. Players are not (are they?) required to ploay on their national teams, rather- it is an honor to be selected. Looking at it from that viewpoint- the activities of players outside of their club responsibilities- it becomes clear to me that the teams should not receive compensation for players participating in other tournaments. is it hard on the teams? A bit, but it is a natural risk they have to take in signing the best players.
After all, Rooney was English before he was a Manc, Henry was French before a Gunner and Ronaldinho a Brazilian before a member of Barcelona.