You are in an environment that does not use HA clusters.
Then the answer is simple.
Virtual machines with the same IP address cannot be placed on the same subnet (network segment). You need to separate the virtual switches and connect the virtual machines to separate virtual switches.
If you want to communicate between this virtual machines, you need to use NAT to perform IP address translation using a router or L3 Switch.