We usually avoid the WSL default of putting the full Windows PATH into WSL. Particularly when using a build system like CMake, there will be Windows libraries that WSL-based CMake thinks it can use that it actually can’t. There are a lot of StackExchange questions on this topic as well.
There is a trivially-simple fix to this problem. Simple be sure that
[interop] enabled=false appendWindowsPath=false
Don’t populate Cygwin PATH from Windows PATH.