You can restrict the ability to change repository visibility to organization owners only, or allow members with admin privileges for a repository to also change visibility.
Warning: If enabled, this setting allows people with admin permissions to change an existing repository to any visibility, even if you do not allow that type of repository to be created. For more information about restricting the visibility of repositories during creation, see "Restricting repository creation in your organization."
- In the top right corner of GitHub.com, click your profile photo, then click Your organizations.
- Next to the organization, click Settings.
- In the left sidebar, click Member privileges.
- Under "Repository visibility change", deselect Allow members to change repository visibilities for this organization.
- Click Save.