I tried using this on both of the iPad Pros and got garbage. Then, by accident really, I saw a advertisment for 'Luna Display', which is from the Astropad people. It's basically a USB-C dongle that tricks the MBP into thinking a monitor is connected. Now, they want $70 US for this, which is fine, as it's USB-C, but I found that you can get regular HDMI dongles that do the exact same thing for $10 Amazon:
'CompuLab Display Emulator (fit-Headless)' is the one I bought, but there are quite a few
So I bought it, and lo and behold, it fixes Duet. I think you may need this hack now that Apple has done something to screw up this type of application, but at least there's a cheap solution (If you have the HDMI USB-C adapter, also)
Note: Luna is also pre-order and there may be a long wait for it (months). Or not.
Frankly, I was a bit surprised when all of a sudden Duet no longer worked. It had worked great for years. But the real issue, is the last update was many months ago (maybe even 2017), which doesn't look good, especially when it..... no longer works
They'll be others