Issues with Unifi AP with PCC config

Hello friends,
I have configured 5 VLANs with access through an L3 switch. All routing is done on the router. UNIFI access points are connected to the L3 switch. A bonding interface is created on the router, and all VLANs operate through this interface. The router has connections to two ISPs: one with a static IP address and the other with a dynamic IP address. PCC is configured for one of the VLANs.
Overall, PCC works fine, but I periodically lose access to the UNIFI access point. The access point goes offline in the UNIFI cloud key, and after rebooting, it shows up in the console again. At the same time, the access point can be pinged, but traceroute shows that the route from the router to the access point goes through the second ISP’s gateway. I believe the issue is related to the mangle rules, because when I disable the rules, the access points work fine and do not disconnect. The traceroute with mangle rules disabled goes directly from the router to the access point.
English is not my native language, so please forgive any mistakes. I would be very grateful for any help and advice. Below are my mangle rules.

add action=mark-connection chain=input connection-state=new in-interface=
sfp-sfpplus1-WAN new-connection-mark=ISP1_conn passthrough=yes
add action=mark-connection chain=input connection-state=new in-interface=
sfp-sfpplus8-WAN new-connection-mark=ISP2_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark
connection-state=new in-interface=sfp-sfpplus1-WAN new-connection-mark=
ISP1_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark
connection-state=new in-interface=sfp-sfpplus8-WAN new-connection-mark=
ISP2_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark
connection-state=new dst-address-type=!local in-interface=V-20
new-connection-mark=ISP1_conn passthrough=yes per-connection-classifier=
both-addresses:2/0
add action=mark-connection chain=prerouting connection-mark=no-mark
connection-state=new dst-address-type=!local in-interface=V-20
new-connection-mark=ISP2_conn passthrough=yes per-connection-classifier=
both-addresses:2/1
add action=mark-routing chain=prerouting connection-mark=ISP1_conn
in-interface=V-20 new-routing-mark=ISP1_table passthrough=yes
add action=mark-routing chain=prerouting connection-mark=ISP2_conn
in-interface=V-20 new-routing-mark=ISP2_table passthrough=yes
add action=mark-routing chain=output connection-mark=ISP1_conn
new-routing-mark=ISP1_table passthrough=yes
add action=mark-routing chain=output connection-mark=ISP2_conn
new-routing-mark=ISP2_table passthrough=yes