Hi @ericstottelaar . This is the known and expected behaviour because PCI reordering takes place when changing from Legacy BIOS to UEFI on some server models. See Broadcom KB: How VMware ESXi determines the order in which names are assigned to devices which also has some examples of renaming vmnics using the localcli command. There is no known way of tweaking the host interface placement policies to change the device (vNICs & vHBAs) order to what you had on Legacy BIOS.
Even though only UEFI is supported with newer UCS firmware versions on M5 & M6 (older 4.1.3 firmware on M5 did support Legacy BIOS), from our experience, there is very low to no risk to staying on Legacy BIOS. We have upgraded dozens of hosts on Legacy BIOS from ESXi 7.0 U3 to ESXi 8.0 U3 and none of them have become unbootable or had stability issues (two of the possible adverse effects of staying on Legacy BIOS). Even though we have the commands to bulk rename vNICs, due to the number of hosts that we had to upgrade, we decided to leave our M5s on Legacy BIOS. Switching M6s to UEFI did not cause device reordering for us.
Cisco UCS KB article: Cisco UCS vNIC/vHBA Placement : Issue with desired order in VMware ESXi discusses the issue in detail.