copy

Creates a copy of this command with a new header.

This method ensures that mutable header state is properly copied to prevent unintended sharing between command instances.

Return

a new command instance with copied header