HA is a VMware that monitors VMs. If a VM stops reporting back, HA assumes that something is wrong with the VM and tries to bring it online. If the VM is powered off, HA can consider that the host is having issues and will try to find the VM, move it to another host and power the VM on the host.
When Veeam Backup & Replication starts the restore process, it copies the VM .vmx file to the datastore and registers it on the host. As soon as the VM is restored and registered with the original name, the restored VM becomes the original VM in the vCenter inventory. Then, HA locates this VM and tries to bring it online.
You will see the following errors related to VM file locks:
Error Failed to restore vm. Name: [<EXAMPLE_VM>]
Error DiskLib error: .The file is locked or in use -- File open failed: File not open (Veeam.Backup.Common.CCppComponentException)
Error [AP] (f10e) error: DiskLib error: .The file is locked or in use -- File open failed: File not open
Error Unable to write VMX file: /vmfs/volumes/<GUID>/<EXAMPLE_VM>/<EXAMPLE_VM>.vmx.
Error Failed to lock the file
This causes the restore process to fail or slows the process for hours so that the process fails due to timeout.