The term "Dungeons & Dragons" is not open content
The text within the SRD 5.1 document that is being put under CC-BY-4.0 never uses the term "Dungeons and Dragons" other than in the request not to use the term, so it is not part of the material made freely available.
There are two different licenses now:
the OGL SRD 5.1 with all the OGL boilerplate and the rules text, and
the CC-BY-4.0 SRD 5.1 with the much shorter Legal Information boilerplate:
The System Reference Document 5.1 is provided to you free of charge under the terms of the Creative Commons Attribution 4.0 International License (“CC-BY-4.0”). You are free to use this content in any manner permitted by that license as long as you include the following attribution statement in your own work:
This work includes material taken from the System Reference Document 5.1 (“SRD 5.1”) by Wizards of
the Coast LLC and available at https://dnd.wizards.com/resources/systems-reference-document. The SRD 5.1 is licensed under the Creative Commons Attribution 4.0 International License available at
https://creativecommons.org/licenses/by/4.0/legalcode.
Please do not include any other attribution regarding Wizards other than that provided above. You may, however,
include a statement on your work that it is “compatible with fifth edition” or “5E compatible.”
Section 5 of CC-BY-4.0 includes a Disclaimer of Warranties and Limitation of Liability that limits our liability to you.
which is followed by the a page intentionally left blank, and again the rules text.
Nowhere in the CC-BY SRD 5.1 are the terms D&D or Dungeons & Dragons used, other than in the explicit request not to use the term Dungeons & Dragons, so those are not made exempt from copyright or put under CC-BY.
The CC-BY license guidance further advises you as a user
Pay attention to what exactly is being licensed.
The licensor should have marked which elements of the work are subject to the license and which are not. For those elements that are not subject to the license, you may need separate permission.
Now you could claim that asking not to use the term is not the same as excluding it from being subject to the license, but the term was never made available under the CC-BY license to begin with, so there is no need to exclude it. That ask I think is really just to drive home the point for those to which it is not obvious they should not use it. I'd be very surprised if WotC's lawyers have not double checked that this still works to protect their primary copyrighted asset, the Dungeons & Dragons name.
(Note: I'm not a lawyer, and don't claim to be one. Get legal advice, if you need it, from a lawyer).