This is what the current terms of service of Copilot say: you as the user are responsible for ensuring you are not breaking anyone's copyright when you accept an auto-completion from Copilot. How you would know that it just spit out someone else's code is unspecified, of course.
Of course, similar tools that make it easy to infringe others' copyright are less accepted when they don't come from corporate behemoths (cough Popcorn Time cough), but such is the world we live: copyright protection for me but not for thee.