The warning of server authentication fails is could be chose under advanced option of RDC. But per below article, it could also be modified by commands or scripts:
Navigate to Configure RDSH Server Certificates
Note: The author also confirmed the risk of this change: if you don’t mind the certificate warnings, don’t change the Session host RDP certificates. If you make the change from the default, when DNS names don’t match authentication will fail, meaning that you will not be able to access the session hosts.
Hope this helps and please help to accept as Answer if the response is useful.