Can boot to Ubuntu, or Windows, but not both

It sounds like you accidentally installed Ubuntu in CSM or "Legacy BIOS" mode.

To fix this, you're going to have to re-install GRUB from within Ubuntu.

First, install boot-repair:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install boot-repair

Secondly, open boot-repair and go to the "Advanced Options." Within that, go to "GRUB Location."

From within this view, check the Separate /boot/efi partition button. Finally, click Apply.

Next, you must go back into the BIOS and disable Legacy Mode, but keep Secure Boot off.

When you reboot, GRUB should load and Windows should be detected.

(source)