I happen to have worked on exactly this at Google. No, we don't train on restrictively-licensed code to the best of our abilities.
(FWIW, and not directly related to my question, I always thought of GPL as the less (not more) restrictive license from the perspective of a user, because I could always ask for the source code and debug a problem on my own.)