MainWP Child is not designed or tested for WordPress Multisite, so our support for this setup is limited.
Based on what you described, this does not look like MainWP Child making blocking outbound requests during a normal WordPress login. The more likely cause is local login/change logging inside MainWP Child.
When login activity is recorded on multisite, the plugin may need to check the user’s roles across sites and save the event to the Child changes-log tables. On some multisite networks, especially larger ones, that can be slow enough to cause a 504 timeout during login.
As a diagnostic test, you can temporarily disable the MainWP Child login logger with a small MU plugin:
If the mu-plugins folder does not exist, create it first.
Then try logging in again. If the 504 stops, that confirms the timeout is coming from the local login/change logging path rather than an outbound request.
WordPress® is a registered trademark of the WordPress Foundation, and WooCommerce® is a registered trademark of WooCommerce, Inc. MainWP is an independent product and is not affiliated, associated, or endorsed by the WordPress Foundation, WooCommerce, Inc., or Automattic Inc., except where noted under the Jetpack® API and Trademark License Agreement. All product names, logos, and brands are property of their respective owners and are used for identification purposes only.