Leviticus 27:10 "Then both it (the original animal) and its substitute shall be holy"

An animal designated for sacrifice is considered special. If that animal has been exchanged for another, the Torah commands us to consider both of them as holy (see Negative Mitzvah 106).