Problem with toggles and long presses

I am trying to have a switch do the following:

In position 1, a press engages the effect;
In position 2, a long press sends a CC, and a single press disengages the effect.

With Toggle Mode On, it looks like every release (including long press release) toggles the preset, so I can’t do the long press without turning the effect off at the end.

With Toggle Mode Off I tried using Set Toggle; for posi 1 I engage the preset when the switch is released, and for posi 2 I disengage it again when released - but the problem with the latter is that when I release in posi 1 the same release is caught as happening in posi 2, and it goes immediately back to posi 1!

How can one do this? I can’t believe that this is not possible.

If you want to use Long Press, don´t use Press. In fact the Long Press will alse trigger a Press. I would make it this way with toggle mode On:
In position 1, a release engages the effect;
In position 2, a long press sends a CC, and a release disengages the effect.
Hope I did understood your problem.

Not quite - the issue in the steps you describe is that the end of the long press in position 2 is also seen as a release, and that brings the preset back to position 1 while I don’t want that.

Have you tried? The end of a Long Press is a Long Press Release and not a Release.