https://github.com/bitcoin/bitcoin/blob/d72758c3f6c34cd835f5de3efc230964f3b1ea56/src/torcontrol.cpp#L539

If a user is running Tor proxy outside localhost (perhaps on other host inside LAN or in containerised environment) , the automatic creation of onion services ends up creating an onion service listening to hardcored 127.0.0.1 address on the Tor proxy's host instead of the private address of the bitcoind – effectively running an empty onion service listening the Tor proxy's localhost.
{
    LOCK(cs_totalBytesSent);
    return nTotalBytesSent;
}
ServiceFlags CConnman::GetLocalServices() const
{
    return nLocalServices;
}
void CConnman::SetBestHeight(int height)
{
    nBestHeight.store(height, std::memory_order_release);
}
int CConnman::GetBestHeight() const
{
    return nBestHeight.load(std::memory_order_acquire);
}
unsigned int CConnman::GetReceiveFloodSize() const { return nReceiveFloodSize; }
CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const CAddress& addrBindIn, const std::string& addrNameIn, ConnectionType conn_type_in)
    : nTimeConnected(GetSystemTimeInSeconds()),
    addr(addrIn),
    addrBind(addrBindIn),
    nKeyedNetGroup(nKeyedNetGroupIn),
    
    
    
    id(idIn),
    nLocalHostNonce(nLocalHostNonceIn),
    m_conn_type(conn_type_in),
    nLocalServices(nLocalServicesIn),
    nMyStartingHeight(nMyStartingHeightIn)