You cannot edit grub.cfg. Any update-grub will overwrite that and any kernel, grub or some other updates will trigger a update-grub. So you changes are only temporary.
UEFI seems to remember things on its own. To uninstall you have to remove the Ubuntu partition, remove the ubuntu folder in the efi partition and then go into UEFI "Boot maintenance manager" or "UEFI Shell" and edit/remove the saved entries. And reset UEFI to use the Windows efi file as the default boot. For those where the efi files were renamed by Boot-Repair, they need to run Boot-Repair and un-rename them or restore files.