Hatnotes on dewiki are not contained in elements with the "hatnote" class. They come from a variety of templates that produce HTML tables with the desired notices; and these appear to have unique element ids based on the template used, rather than a common class.
Examples:
https://de.wikipedia.org/api/rest_v1/page/html/Berliner_Mauer ([[ https://de.wikipedia.org/wiki/Vorlage:Begriffskl%C3%A4rungshinweis | Vorlage:Begriffsklärungshinweis ]])
```
<table id="Vorlage_Begriffsklärungshinweis" cellpadding="0" cellspacing="8" class="hintergrundfarbe1 rahmenfarbe1 noprint navigation-not-searchable" style="border-bottom-style: solid; clear: right; font-size: 95%; margin-bottom: 1em; width: 100%; " role="navigation" about="#mwt1">
<tbody>
<tr>
<td style="width: 26px; vertical-align: middle" id="bksicon">
<figure-inline typeof="mw:Image">
<span>
<img alt="" resource="./Datei:Disambig-dark.svg" src="//upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Disambig-dark.svg/25px-Disambig-dark.svg.png" data-file-width="444" data-file-height="340" data-file-type="drawing" height="19" width="25" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Disambig-dark.svg/50px-Disambig-dark.svg.png 2x, //upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Disambig-dark.svg/38px-Disambig-dark.svg.png 1.5x"/>
</span>
</figure-inline>
</td>
<td> Der Titel dieses Artikels ist mehrdeutig. Weitere Bedeutungen sind unter <a rel="mw:WikiLink" href="./Berliner_Mauer_(Begriffsklärung)" title="Berliner Mauer (Begriffsklärung)">Berliner Mauer (Begriffsklärung)</a> aufgeführt.
</td>
</tr>
</tbody>
</table>
```
https://de.wikipedia.org/api/rest_v1/page/html/Wikipedia ([[ https://de.wikipedia.org/wiki/Vorlage:Dieser_Artikel | Vorlage:Dieser Artikel ]])
```
<table id="Vorlage_Dieser_Artikel" cellpadding="0" cellspacing="8" class="hintergrundfarbe1 rahmenfarbe1 noprint navigation-not-searchable" style="border-bottom-style: solid; clear: right; font-size: 95%; margin-bottom: 1em; width: 100%; " role="navigation" about="#mwt1">
<tbody>
<tr>
<td style="width: 26px; vertical-align: middle" id="bksicon">
<figure-inline typeof="mw:Image">
<span>
<img alt="" resource="./Datei:Disambig-dark.svg" src="//upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Disambig-dark.svg/25px-Disambig-dark.svg.png" data-file-width="444" data-file-height="340" data-file-type="drawing" height="19" width="25" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Disambig-dark.svg/50px-Disambig-dark.svg.png 2x, //upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Disambig-dark.svg/38px-Disambig-dark.svg.png 1.5x"/>
</span>
</figure-inline>
</td>
<td style="vertical-align: middle"> Dieser Artikel behandelt die freie Online-Enzyklopädie Wikipedia. Für die deutschsprachigen Ausgabe siehe <a rel="mw:WikiLink" href="./Deutschsprachige_Wikipedia" title="Deutschsprachige Wikipedia">Deutschsprachige Wikipedia</a>. Für den gleichnamigen Asteroiden siehe <a rel="mw:WikiLink" href="./(274301)_Wikipedia" title="(274301) Wikipedia">(274301) Wikipedia</a>.
</td>
</tr>
</tbody>
</table>
```