Because when you unplug it is changing profile, because you just changed from wired mode (which will use a soft profile in preference to a HW one) to wireless mode. It's crazy crap like this that drove me crazy, and it was doing this to me as well, until I did the following:
1) Made sure the soft profile is NOT FIRST on the list in iCUE. I moved it to the bottom.
2) I moved my desired hardware profile to being FIRST in iCUE.
3) I made all my changes and saved it to the mouse regarding Sleep settings.
Things worked well, tho I would still get some weirdness on occasion, despite my soft profile matched my HW1 profile, so I did this:
4) To insure this doesn't happen to me again, I simply deleted ALL my soft profiles.
Now I can plug and unplug it all day long and I don't get any changed settings.