That's exactly what you did wrong.
Many Pokemon, especially in Gen 8, have their EC-PID-IV-Nature-HT-WT correlated.
Meaning they're all generated from the same value, and can be determined to have been generated from the same value.
If you change one haphazardly, the program can tell that it doesn't match the generation protocol.
TL;DR: You changed something that should not be changed.