Hi,
have you registered your plugin to the update message? If that is the case, then it is firing because activate/deactivate also counts as an update to the entity. In order to avoid the plugin being fired you can use some kind of check on the "Status" field,
something like this:
var case = (Entity)pluginContext.InputParameters["Target"];
if (case.Contains("statecode"))
{
return;
}
or check if the entity only contains changes to the attributes you want to track.
Greetings,
Pavlos
Please mark this reply as an answer and vote it as helpful if it helps you find a resolution to your problem.