Direct3D11 in the Unity editor gives black screen

If I set graphics API for windows to OpenGLCore, it works (the only setting that works), but that is deprecated.