The “Restrict to OS version” will only work with RHEL, not CentOS. (Explanation in this post.)
However, it seems odd that both machines can see the repos. For an OS-restricted repo, I would expect neither CentOS machine to see them.
Or maybe I’m misunderstanding and they are both actually RHEL machines? If that’s the case, what do you mean by “see them?” You’ll still see both of them in the Repository Sets tab on the host’s details page in the web UI. But on the actual RHEL system, the non-matching restricted repo should be missing from the output of subscription-manager repos
.