Animals caught in leghold traps have been known to do that. But malaria does it too:
The most frequently used diagnostic test kit checks for the presence in the patient’s blood of either of two similar malarial proteins, called pfhrp2 or pfhrp3. A new paper in Nature Microbiology — “Plasmodium falciparum is evolving to escape malaria rapid diagnostic tests in Ethiopia” — informs us that malaria variants that have deleted the genes coding for those proteins are spreading in Ethiopia.3 Like tusks to elephants, the proteins are presumably useful to the parasite, other things being equal. But when the environment changes and the proteins become a net drawback, the quickest evolutionary solution is to get rid of them. That’s an interesting fact of biology and can be medically important. However, it’s important to note that it’s just one more example of devolution — the beneficial loss of genetic information.
It’s also important to note that devolution is not restricted to situations where humans are hunting other organisms. Rather, loss of genetic information is expected to occur in whatever situation or moment when it would be helpful. I capture this fundamental evolutionary concept in my 2019 book Darwin Devolves, as what I call the First Rule of Adaptive Evolution: Break or blunt any gene whose loss would increase the number of offspring.Michael Behe, “Devolution Watch: Malaria Gnaws Off a Leg” at Evolution News and Science Today (September 30, 2021)
You may also wish to read: Devolution: Getting back to the simple life