Magic removal time!
OMG, I am so excited. But I have to prep slides for tomorrow, no time to do this now. Thus I am writing some notes here.
See https://tei-c.org/Vault/P5/4.6.0/doc/tei-p5-doc/en/html/ref-TEI.html. Note that there is a proper namespace declaration in both examples. How the BLEEP did it get there? We cannot​ put a namespace declaration for the empty namespace on an element in an <eg:egXML> (unless it is on an element that has an explicit prefix), because its contents need to be in the eg: namespace.
The answer is that there is magic in the Stylesheets.[1]
Now take a look at https://www.wwp.neu.edu/outreach/seminars/miami_2023-07/presentations/manuscript_encoding/advanced_manuscript_encoding_10.xhtml. The source for that slide uses <egMarkup>, an element that has the same kind of namespace specification restriction. So how did the namespace declaration get there?
Simple. So simple I am annoyed at myself for not thinking of this long ago. In the source it is not a namespace declaration, it is an xmlns attribute in a namespace. Thus it makes it to the Stylesheet as an attribute node and can be processed like any other attribute. The special case in the stylesheet that processes that slide is simple, straightforward, and easy to document: “An attribute in the duck: namespace has its prefix stripped off before it is rendered in the output”.

Note
[1] Particularly in Stylesheets/common/verbatim.xsl, starting at roughly line 463.