This is discussed in 5th-edition sources.
Volo's Guide to Monsters (2016) and Waterdeep: Dragon Heist (2018) supplement, and in some cases update, the information from Dungeon #206 (2012) that Quadratic Wizard provided in their answer.
The first two paragraphs of the passage quoted below discuss what Xanathar Guild members know about their leader, while the third paragraph discusses what Waterdhavians in general know.
What Others Know
The organization's grunt-level employees—thieves, slavers, and
ordinary thugs—work for the Xanathar Guild because it pays well.
They don't necessarily know their leader is a beholder; they just know
the boss is powerful, dangerous, and doesn’t tolerate mistakes.
Although previous Xanathars carefully guarded the facts of their true
nature and allowed only a handful of their lieutenants to know the
truth, the current Xanathar treats the matter more like an open
secret. All of its lieutenants, as well as many mid-level members of
the guild that the Xanathar trusts, know that the guild is run by a
beholder.
Most of the guild's low-ranking members have an idea that the boss
isn't human, especially given how long the Xanathar has been in power
(they aren't aware that several beholders have held the job). Most
believe their leader is a member of a long-lived race, perhaps a dwarf
or an elf. Some think the truth is more monstrous, and that the
Xanathar is a drow or perhaps a dragon in humanoid form.
The people of Waterdeep are generally aware that there are one or more
guilds controlling criminal activity in the city. Rumors occasionally
surface about a monstrous crime lord, such as a demon or a dragon,
that guides its organization from the shadows. Most common folk
dismiss these rumors and the fools who circulate them, asserting that
the Lords of Waterdeep would never allow such creatures to roam the
city.
—Volo's Guide to Monsters, chapter 1, section "Beholders: Bad Dreams Come True," subsection "The Xanathar Guild"
The current Xanathar doesn't guard its identity as closely as its predecessors did; consequently, more guild members than before know that the Xanathar is a beholder. However, among the lower levels of the guild, the Xanathar's nature is still not well known:
Among low-ranking guild members, rampant speculation goes on about the
true nature of Xanathar. Few have any inkling that their boss is a
beholder, and fewer still have seen or spoken to the eye tyrant.
—Waterdeep: Dragon Heist, introduction, section "Xanathar Guild"
It is worth noting that when the Waterdeep: Dragon Heist adventure begins, the Xanathar Guild and the Zhentarim have begun fighting openly in the streets of Waterdeep, a fact hammered home more than once in the adventure's first chapter. Thus it is reasonable to conclude that many Waterdhavians who were not previously aware of the guild's existence have recently been made aware.