Yes - deploy the VMs into the same availability set and ensure that the number of update domains matches the number of the VMs.
More at https://learn.microsoft.com/en-us/azure/virtual-machines/availability-set-overview
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin