The origin of the problem was that the server was responding with a 302 redirect to the https endpoint instead of 200 with the content. Is already fix (Dec 2022) and it should work with your configuration.
As of today Dec 13, 2022 the response from the nmcheck.gnome.org
servers does not return the header "X-NetworkManager-Status", and that seems to affect the behavior of NetworkManager.
According to the documentation of NetworkManager this is not necessary but it does not work correctly, in comparison the servers of ubuntu return the right header but an empty content which makes NetworkManager happy (at least in version 1.40.6 of NM).
Adding
uri=http://connectivity-check.ubuntu.com/
response=
to the file /etc/NetworkManager/conf.d/20-connectivity.conf
fixes the problem.
Edit: In closer inspection, the response of nmcheck.gnome.org
with http is a redirect to https, simply using uri=https://...
would work if you are don't have to sign in a network, but in many cases that first request under https wouldn't work. So, stay with the ubuntu servers for now until gnome fixes the response.
You can also use another site like http://httpbin.org/
, http://example.org/
or anything similar with the appropiate content or just an empty response would pass.
Edit: The servers of gnome where fixed today Dec 16, 2022 and it now respondes to http requests with the right content and not a 302 redirect, so using uri=http://nmcheck.gnome.org/check_network_status.txt
should work now.