The stat boosts stay applied to that stat. Suppose I have an attack stat of 100, and a defense of 200 my stats lowered when the foe uses screech 3 times. This will raise my defense 6 stages. After using a swap move, the boost still applies to my defense, so before swapping, I had an attack of 100 and a defense of 800. Now after power swapping, The stat boosters are applied to my new defense of 100, making a total of 400. It won't affect the boosts themselves.