I have a complicated setup with a headless remote machine where this error gets in the way very often. The easiest way to reproduce is using Remote Desktop to connect to a machine with Factorio (it can have displays), launching it, and immediately closing Remote Desktop session. Might need to write a short script to launch in 5 seconds so that it launches with RDP session already off.
It sounds like Factorio is trying to get current display info presumably for full-screen, but I am running it in a window, so it should not need that.
[1.1.87] Failure with SDL_DXGIGetOutputInfo when no display attached
Re: [1.1.87] Failure with SDL_DXGIGetOutputInfo when no display attached
Post the log of a session with the issue, see 3638.