Cannot boot into Ubuntu installed on an external SSD after installing Windows with Boot Camp
Grub was installed on the EFI partition of the internal drive. When you installed Windows the BOOTX64.EFI file was overwritten. The shimx64.efi file usually is a duplicate of the overwritten file.
Since the boot files for both Windows and Ubuntu are sharing the same EFI partition, the simplest solution would be to install the rEFInd boot manager. There are many ways to install rEFInd. Below are two different ways. Once you have installed rEFInd, you will probably want to edit the refind.conf file to remove duplicate entries.
Install rEFInd to the EFI partition.
This is the default. You will have to temporarily disable System Integrity Protection (SIP) to install this way. The instructions are given here. To edit the refind.conf file from macOS, you will have to mount the EFI partition. The mount command is given below.
sudo diskutil mount disk0s1

To unmount, enter the command given below.
diskutil unmount disk0s1

Install rEFInd to a HFS+ partition.
You have to use the Disk Utility application or the diskutil command to create a small &quot;Mac OS Extended (Journaled)&quot; formatted partition to hold the rEFInd files. This way does not require you to disable SIP to install. Also, you can select rEFInd as the default directly from the Startup Manager (by holding down the option key on startup). The installation instructions are given here.
Create Another EFI partition for Grub.
An alternative solution, which does not require rEFInd, involves using the
Disk Utility application or the diskutil command to create another EFI partition. You can then copy the /EFI/BOOT and /EFI/ubuntu folders to the new partition. Afterwards, you will need to overwrite the /EFI/BOOT/BOOTX64.EFI file with the EFI/ubuntu/shimx64.efi file in this new EFI partition. This solution would allow both Windows and Ubuntu to appear in the Startup Manager. If you use this solution, you should consider changing the label to something other than EFI Boot and using an Ubuntu icon. Basically, you have to adapt steps 5 and 6 of this answer.