Code on GitHub is "all rights reserved" by default, which means that it is illegal to copy by default. Only by adding a license does it get opened up and made legal to copy - though typically, only if you also include that license when you do so.
So if you trained yourself to only regurgitate github code with wanton abandon and careless disregard for licensing, then yeah, you're liable to violate that default copyright, and certainly going to be violating license rules if you're regurgitating large blocks from memory but not their accompanying licenses.
This is the system that github and Microsoft participate in and willingly and purposely perpetuate. They benefit immensely from copyright law and protection of their code. You can get that they will damned-well avoid letting copilot anywhere near Windows' source, and they would very much enforce their copyright if copilot was spitting that code out for the masses to use.
So if you trained yourself to only regurgitate github code with wanton abandon and careless disregard for licensing, then yeah, you're liable to violate that default copyright, and certainly going to be violating license rules if you're regurgitating large blocks from memory but not their accompanying licenses.
This is the system that github and Microsoft participate in and willingly and purposely perpetuate. They benefit immensely from copyright law and protection of their code. You can get that they will damned-well avoid letting copilot anywhere near Windows' source, and they would very much enforce their copyright if copilot was spitting that code out for the masses to use.