So basically, service endpoints are not for Virtual machine it is for VNet and PaaS services. In able to communicate between two VMs, then your VMs should be in same Vnet or we need to peer the Virtual Network using Vnet peering.
I hope this will help.
Want to become an Azure expert? join Azure certification now!!
Want to know more about Azure Virtual Network? Watch this video on What is Virtual Network | Azure Tutorial :