UEFI boot boots entries in the ESP (EFI System Partition), not drives. Ubuntu has had this nice UEFI guide for many years now.
Bootloaders coexist in the EFI partition. The Windows bootloader won't overwrite Grub and vice-versa. They will always be separated entries. This is the main aspect of UEFI you need to understand because you're coming at it from the way it used to be with BIOS where indeed any newly installed bootloader would overwrite the previous one (BIOS boot uses the drive's MBR to store the first stage bootloader and there can be only one at a time).
Now, Windows typically uses only one (top-tier) bootloader to boot multi instances of different Windows versions/installations. From there users select among the several (Windows) installations. So, what will happen when both Windows are aware of each other is that you'll have an additional (Windows only) boot menu. Setting the boot back to "Ubuntu" (Grub), booting Ubuntu and running sudo update-grub
will make all the required changes. You'll still see only one "Windows 10" entry in Grub's menu but now, after selecting it, you should be presented with an additional boot menu allowing you to select one or another.