Electron desktopCapturer capture sources from all desktops/workspaces

So I am trying to create a screen recorder using electron and react, I am trying to create a picker where the user has the option to select a source to record.

I am using electron’s desktopCapturer to capture the sources and then display it on the picker, but the problem I am facing here is that it only captures the windows open on the current screen/workspace.

What I mean by this is suppose in mac OS, you open an app in fullscreen mode, this app goes into a virtual workspace. Now these applications are not listed by desktopCapturer.getSources() .

How do I get the application sources that are opened in different workspaces/desktops?