Hey
It's not a bug.
The item sets are saved (Magatamas/Refinements on the equipment) but the equipment shuffles around based on what the system deems best for them.
The way to easily fix this, make sure to have your main team set with the correct equipment, testing teams on another set. That way it's easier to manage. Once you switch back to your main (Set), all the items will be adjusted to what you put it.