Unfortunately, on both Windows and Mac, open-source solutions don't exist because no single developer wants to deal with driver signing.
On Linux, you can do this a number of ways:
- the evdi kernel module can create fake video outputs (I'm currently working on a CLI for it - stay tuned)
- xrandr can force-enable disconnected video outputs (I believe even if you've used up all the CRTCs)
- xrandr with Intel drivers can create virtual screens
- swaywm has a config option to make virtual screens