The solution is that to connect a real monitor to the headless machine. Then the OS will see it. Then in the device manager you have to update the basic monitor (not the display adapter!) driver, just takes a minute. After that everythink will work. At least in my case.
What I did more is to bring all windows 10 machine to the latest windows 10 version actually to 1903. It can be important too, because of there were windows update issues with the RDP (Remote Desktop).
The other solution could be what other supposed here, to use a dummy, headless ghost display connector (very cheap).something like this: https://www.amazon.com/Displayport-Display-Emulator-Headless-4096x2160/dp/B074FT1P8M/ref=pd_cp_147_4...
As I understand this failure regarding to usually AMD video cards, because of if there isn't a real monitor connected, then it sends somewhow just the basic, lowest resolution display, what will be later captured by Teamviewer or other remote desktops solutions. In our case the video card was a AMD FirePro.