Switching to bypass and back occurs link flapping. In that case, when all the links on one DPI platform some switches treate as lost of all connections and as a result LAG is rebuilded.
It is recommended to set delay between switching for switch links one by one:
bypass_link_delay=5
It helps avoid downtime during regular shutdowns and restarts DPI 1)
Keep in mind that when the connection between dpi and a switch dropped Only one link in the chain of the two kommutator1 ←link1→ dpi ←link2→ kommutator2 is brocken. This is detected for a long time under standard LACP settings (default is 30 seconds). For the fast detection of such disconnections should be used additional protocols - BFD, or tuning the LACP (fast switchover).