Your statement was "people living in the same country are indeed more closely related to each other than to people of different countries"
The first chart shows a direct counterexample with "African American", "Mexican American" and "North America" groups more separated from each other than from other groups and yet many of them live in the same country. These are also not the only groups of people you'd find in North America, they're just the ones used in the study of Northwestern american indigenous groups that this is screenshotted from. This is, again, poor evidence for your claim.