That's why it's called copyright. You can perfectly sign it away.
In Germany the right is called "Urheberrecht" which literally translates to "author's right". And while you can license your work and sign away the usage, you cannot by definition sign away the fact that you are the author of a work.
In English this is usually translated as "moral rights"[1]. They are fairly widespread in other civil law jurisdictions than Germany too. Less so in common law jurisdictions.
But they exist to a (very) limited extent even in the US.
This is handled in the employment contract. The "Urheberrecht" is not transferable only inheritable, but you can grant "Nutzungsrechte" which means "rights of use". So in your contract you just grant your employer unrestricted and exclusive rights of use.
In Germany the right is called "Urheberrecht" which literally translates to "author's right". And while you can license your work and sign away the usage, you cannot by definition sign away the fact that you are the author of a work.