In GitLab EE 10.5 through 12.5.3, 12.4.5, and 12.3.8, when transferring a public project to a private group, private code would be disclosed via the Group Search API provided by the Elasticsearch integration.
https://about.gitlab.com/blog/categories/releases/
https://about.gitlab.com/blog/2019/12/10/critical-security-release-gitlab-12-5-4-released/