Electrum-NMC can't make outgoing connections on Python 3.8+
The Electrum-NMC version in Tor Browser is affected by this bug: https://github.com/kyuupichan/aiorpcX/pull/32 . The gist is that Electrum-NMC fails to properly initialize random SOCKS authentication when on Python 3.8+, which causes all outgoing connections to ElectrumX servers to fail with a Python exception. Thus, no Namecoin resolution is possible with those Python versions.
The master-3.3.11
branch of Electrum-NMC contains a backported fix, which should be usable for Tor Browser. I'll submit a patch for tor-browser-build
that bumps the Electrum-NMC dependency shortly.
Thanks to yanmaani for reporting the bug.