I believe credentials are assigned an identifier at the time the credential is created in Jenkins, then that identifier is used in the job definition. That makes the credential definition specific to the Jenkins instance where the credential was created.
You might attempt to copy the credentials from the file system of the source Jenkins server to the file system of the target Jenkins server. That might preserve the credential identifier into the target Jenkins server.
I've not yet learned a highly effective way to extract jobs which use credentials on one machine and then define those same jobs using the Jenkins CLI or other calls on another machine. Maybe others have learned a good technique and are willing to share it with us.
Mark Waite