The firewall may have to be modified. To allow AnyDesk for incoming connections, add AnyDesk to the Whitelist:
Windows FirewallIf the TCP-Listening Port is enabled on AnyDesk clients that are not yet installed hence run portable, the Windows Firewall will asked for permission on the first session request. Disable the TCP-Listening Port in your custom client to avoid the message for portable clients.
If AnyDesk cannot establish direct connections automatically you may set up a listening port manually in your firewall. Enter the port to the AnyDesk settings. See Listening Port