You MAY also find that the drivers needed for the drive are different between legacy and UEFI when switched in the BIOS. This is a situation where booting to Safe Mode MAY help. At least I saw it in the early days of UEFI.
If it still applies the problem is that UEFI and legacy use different drivers for the hard drives. Granted is the fact that my experience with this issue was long ago and the options were EFI or IDE in the BIOS. Still I think this MAY apply as IDE would be like your legacy option and EFI would be like your UEFI option.
Safe Mode offers a bit of a trick here. Set your BIOS to legacy and boot. Set the system to restart in Safe Mode once in Windows. On the restart jump to the BIOS and and set to UEFI and let the system continue to Safe Mode. Safe Mode 'looks' at the boot drive and loads the needed basic drivers. After this you have both sets of drivers installed and either mode will work.
Dvair also brought up going from MBR to GPT as to the drive setup which may well be needed. Doing this could even solve the issue without all my stuff as stated above but it is possible that it could take the combination. A good utility for converting a drive from MBR to GPT is EaseUS Partition Master. There is a free and paid version. The free version should do the job.
https://www.easeus.com/partition-manager/epm-free.html