Uganda is quitting Prince Harry's Invictus Games in support of King Charles, according to the head of its armed forces.