Restore 4.2 EFI boot partition files after installing 4.3

I wanted to test out QubesOS 4.3, so I installed it into a separate partition. Unfortunately, it also overwrote the boot loader of QubesOS 4.2 that I still want to use. How can I regenerate the files in /boot/efi/EFI/qubes of QubesOS 4.2?

There’s this other thread whose solution it is to install it a third time and then copy over the boot loader files.

Despite the other thread recommending against grub2-mkconfig, I tried it anyway, and it resolved my problem. I followed the instructions in the first post of Rescue Re-Install the EFI and Boot Grub initramfs Partitions.