What is the basis of an AI's rights? Why do you believe they exist? If an AI's state (essence) can be perfectly persisted and replicated, as it can due to their digital nature, there is nothing to be lost if an AI ceases to exist and is rebooted in another AI. If the Star Trek transporter could replicate you would you care if it killed your existing copy in the process?
Because the transporter replica is not you. That is a separate person with their own separate consciousness. You are murdered and someone else is born.
Murder is a crime as decided by humans. There are circumstances where killing another person is not a crime, because we have agreed it is not a crime. A doctor turning off life support can be fully legal even though it results in the destruction of a human life. There is no ultimate principle at work. The law is a set of rules that we have (implicitly) agreed to.
Likewise, we as a society could decide that a person has all of their rights transferred to their replica as soon as they walked into a transporter.