2 NICs on docker host

I have an Almalinux 8 server with two network interfaces and different subnets. To make both networks accessible from the outside, I configured routing according to the following manual:


However, after the configuration, my containers can no longer ping the IP address of the host machine in bridge mode. Is there a way to solve this problem without switching the driver to host mode?"