Uganda has withdrawn from the Invictus Games two months after joining, with army chief Gen Muhoozi Kainerugaba citing loyalty to King Charles III.