How to prevent Windows Server from adding external IP addresses for the domain controller into the DNS?

Solution 1:

Assuming that this DC is also the DNS server for the AD domain, the DNS server will register every ip address that the DNS server is configured to listen on. If you don't want it to register those ip addresses then uncheck those ip addresses in the properties pages of the DNS server.

enter image description here

Solution 2:

You need to add the PublishAddresses registry value:

Key: HKLM\SYSTEM\CurrentControlSet\Services\DNS\Parameters  
Registry Value: PublishAddresses  
Registry Value Type: REG_MULTI_SZ  
Registry Value Data:<IP addresses>  

https://techcommunity.microsoft.com/t5/azure-active-directory-identity/dcs-and-network-address-translation/ba-p/243170