The UK monarch doesn't rule over most Commonwealth countries. The monarch only rules over the 15 Commonwealth Realms. For example, India and Pakistan are now republics and the monarch doesn't have a role in their governments. Canada, by contrast, is a monarchy and Commonwealth Realm.
The Commonwealth of Nations an association of countries, but the Commonwealth of Nations does not control the government of any member country (even ceremonially). India and Pakistan are members of the Commonwealth of Nations, but are not Commonwealth Realms.