1) Copilot is not designed to output the source code for a project source file
2) It does not re-create the whole source code, just parts of it (sentences, not chapters)
3) The source code license, e.g. BSD, works on "the code" - copying a line like "void main(void) {" will not trigger it, obviously