Your ping does not always reveal the proper results to match your question.
In general, if there is failure to connect to one mirror then dnf will attempt another mirror (after a timeout) until either all mirrors have failed connection or the download has completed.
Does the update fail totally? or is this simply one noted connection failure instance in the log?
The timeout is 60 seconds and can be configured from /etc/dnf/automatic.conf
Try setting it to a higher value like 120 if it dosent fix then set it to 0,it will skip the network availability test.
Try
sudo dnf5 makecache --refresh
if this suceedes then repo access works, so there could be a problem with automatic command network check fails
I know - I was wondering why the OP was specifically calling dnf5 with automatic when dnf is calling the same binary and apparently works without issues.
automatic seems to be an optional, additional extension which the OP has apparently installed specifically as it’s not installed on my F44 installation out of the box).
...
2026-10-23T15:57:31+0000 [11205] DEBUG Creating repo "rpmfusion-nonfree-source" from config file "/etc/yum.repos.d/rpmfusion-nonfree.repo" section "rpmfusion-nonfree-source"
2026-10-23T15:57:31+0000 [11205] DEBUG Waiting for internet connection...
2026-10-23T15:58:31+0000 [11205] WARNING No network connection detected.
2026-10-23T15:58:31+0000 [11205] INFO [librepo] Librepo version: 1.21.2 with CURL_GLOBAL_ACK_EINTR support (libcurl/8.18.0 OpenSSL/3.5.9 zlib/1.3.1.zlib-ng libidn2/2.3.8 nghttp2/1.68.0 mit-krb5/1.22.2)
2026-10-23T15:58:31+0000 [11205] DEBUG Loading system repo rpmdb from root "/"
...
but the process just continues.
By the way
This comes from the process creating an IPv4 socket and tries to connect with an IPv6 address. That won’t work, naturally. It looks like some strange programming, but other than that, it is harmless.
After decades of working with Unix and Linux, I make it a habit to use versions when available so when looking at old Makefiles, scripts, and logs I know what was actually used.