i believe there is a mod that tries to retain party-effects … not sure what it is tho. Eg
void RefreshSpellEffectDurations(object oTarget, int nSpellId, float fDuration);
Unfortunately that’s sort of experimental and seems to grant back the entire duration (it doesn’t account for duration elapsed iirc).
I can say somethings about the stock setup. SoZ uses a number of onenter (etc) scripts that primarily handle shrinking and unshrinking the character models, and iirc it also removes all effects. While it’s possible to rewrite that, the more difficult issue is the module transitions that often happen to/from the OL: a module transition removes effects and animal companions, and that seems to be hardcoded.
that is, you might need to deal with more than just ‘nx2_ol_client_enter’ (eg. area hb scripts)
And there are switches/functions that deal with dominated party …
const string CAMPAIGN_SWITCH_REMOVE_DOMINATED_ON_TRANSITION = "N2_S_REMOVE_DOM_ON_TRAN";
void StandardAttemptAreaTransition(object oPc, object oDestination, int bPartyTransition);
int RemoveDominatedFromPCParty(object oPc);
although I’m not sure if its use is intended to clear party-members who are dominated, or dominated monsters that are in the party, or both.