If you installed Windows using UEFI boot and Ubuntu using Legacy boot, you may not be able to make this work this way. I believe that UEFI boot always has priority over Legacy boot.
This message was posted on behalf of Intel Corporation
That can be causing this problem, UEFI boot has priority if you installed one of the operating system in UEFI and the other in Legacy boot , however; you can try the solution at the following link:
NOTE: This link is being offered for your convenience and should not be viewed as an endorsement by Intel of the content, products, or services offered there.