Fixing the title to be clear.
Pure Power stays around the entire battle if it isn't swapped or suppressed. The Pokemon with it will retain the Attack boost until it faints or the Ability is removed. Switching in and out of battle will not have any effect on it.
Source: Experience with Abilities
Hope I helped!