I know this thread is kinda old now and the OP gave up but for anyone else who stumbles in here looking for answers:
I'm almost 100% sure that the OPs issue has to do with partition mapping. It sounds as if windows was installed in UEFI mode instead of the old MBR bootcamp fashion. Windows requires one or the other. Installing Ubuntu automatically converts the disk to "mbr hybrid gpt" and it has to be converted back to true GPT before shutting down Ubuntu. This can be done with "gdisk" which comes pre-installed on Ubuntu and does not result in any data corruption. Gdisk will turn on "mbr protection" and allow the disk to be recognized by windows as purely GPT. Any time a partition gets edited in Ubuntu (i.e. gparted) the disk will have to be fixed again by running the proper commands in gdisk.
sudo gdisk
to start the program
/dev/sda
(or whichever disk you might need to edit - make sure this is correct)
x
to enter expert mode
n
to restore GPT
w
to save (write)
And finally
y
to confirm
NOTE: Ubuntu 22.04 and possibly later versions have "os prober" disabled by default which prevents grub2 from booting windows properly. This can be fixed by adding a certain line to the grub configuration and saving the changes. Google is your friend on this issue.
ALSO NOTE: If windows EFI is indeed corrupted it can be restored from a windows install disk or system repair sector using diskpart in the terminal. Again google is your buddy.