I think you are coloring outside the lines by using an unsupported PCIe M.2 card.
So this may or may not work.
Given the fact ubuntu OS sees the M.2, then connectivity is working.
Is the server in Legacy BIOS mode or UEFI mode?
If it is Legacy, then try UEFI mode.
You say Windows is installed on the M.2. Was it installed on this motherboard? If another motherboard, then what BIOS mode was that motherboard using(Legacy BIOS or UEFI)?
In UEFI mode the OS installer is responsible for writing the boot record to the UEFI BIOS on the motherboard.
If Windows was installed to that M.2 on another motherboard, then that boot record needs to be added manually (or reinstall Windows) to this motherboard.