Hi,
You are able to disable the caching with the following command:
slmgr /ckhc (or cscript c:\windows\system32\slmgr.vbs /ckhc)
To enable caching again use the command:
slmgr /skhc (or cscript c:\windows\system32\slmgr.vbs /skhc)
You can verify if caching is active with the command:
slmgr /dli (or cscript c:\windows\system32\slmgr.vbs /dli)
KMS host caching is different to statically configuring clients.
KMS host caching is intended to avoid excessive DNS queries, i.e. the client will cache the host name and only issue a query is that cached host is uncontactable.
A static configuration of the hostname, at the client, completely bypasses/disables the DNSlookup/discovery.
For your reference:
https://learn.microsoft.com/en-us/deployoffice/vlactivation/activate-office-by-using-kms
Hope above information can help you.