Switch Button Issue

Hello everyone! I’m trying to configure an encoder switcher as an enable/bypass control for a plugin. When using the switch in momentary mode , everything works fine. However, I want to use it in toggle mode . The issue is that in toggle mode, the enable function works properly, but for the bypass function, I need to press the button twice. When I press it once, the encoder’s LED flashes briefly, but the plugin doesn’t bypass.

I also checked in Ableton’s MIDI monitor, and it shows that no MIDI signal is being received when I map something to the encoders.