Use profile hold instead of manually switching power profile
This mechanism is made for our exact use case. Request a higher performance profile while a certain operation is running. Afterwards it will return to whatever it was before. We can also provide a reason for the change.