If the code is GPL and you are distributing the code in object form, then it’s okay to remove copyright notices as long as the work carried “prominent notices stating that it is released under [the GPL]”. GPL v3 section 5. [0]. Basically, that section says that if you’re distributing modified code, you’re not required to “keep intact all notices”. Id.
[0] https://www.gnu.org/licenses/gpl-3.0.html