Lost EFI entry in boot menu after removing and re-connecting drive

First, i want to say that this is not qubes issue.

Refering to this Copying the ISO onto the installation medium, then it’s installer medium as your glossary.

Good

I’ve said that first, you need to locate where your EFI file, Disk drive, and Partition.

try run to locate drive and partition :
lsblk
From my thought that you use automatic installer so it can be like this (again this is example):
/dev/sda1 600 MiB vfat
/dev/sda2 1000 MiB ext4
/dev/sda3 (the rest of usb drive) ext4

from above output your efi drive and partition is should be in /dev/sda1


locate efi files.

mount /boot /mnt
mount /boot/efi /mnt/efi
cd /mnt/efi/EFI/

Search in all folder here, and look for your efi files. In 4.1 it’s located in /mnt/efi/EFI/qubes/grubx64.efi, lets say that you found it in /mnt/efi/EFI/qubes/xen.efi.

Then you can create efi boot with :
efibootmgr -v -c -u -L pastor -l /EFI/qubes/xen.efi -d /dev/sda -p 1