You can read between the lines
> GitHub Copilot is trained on billions of lines of public code.
> In one instance, GitHub Copilot suggested starting an empty file with something it had even seen more than a whopping 700,000 different times during training–that was the GNU General Public License.
https://github.blog/2021-06-30-github-copilot-research-recit...
This indicates that they are training it on github's public repositories and at the very least including 700,000 GPL licensed projects or code files. Since the GPL is one of the most "restrictive" open source licenses one can assume they are not caring about the licenses much.