node:10212[DEP0123]DeprecationWarning:Setting the TLS ServerName to an IPaddress is not permitted by RFC 6066.This will be ignored in a future version

I solved same issue by encrypt:false.

options: {
encrypt: false,
trustServerCertificate: true,
}