It seems that the file selector is unusable slow with Electron based apps, for instance Visual Studio Code (not Flatpak) or Discord (also not Flatpak).
It is not the file manager, but the file selector which unfortunately seems that it can't be changed.
At first I thought this was an issue with VS Code in particular but if it's all Electron apps, then it's probably something else. This may actually be a good use case for Flatpaks, if nothing else to narrow down the cause of the issue. Have you tried this?
Oddly enough, it's working fine for me on my end. I wonder if launching VSCode using the --disable-extensions and/or --disable-gpu might make a difference (please check the exact names of those flags).
Do you use the .deb package like me or Flatpak? Flatpak unfortunately is suspected to cause other strange issues, such like a fullscreen bug and also printers are randomly not visible. That is why I now also stay away from Flatpak.
But still the file selector is extremely slow. This also applies to Discord (uses also Electron) with Flatpak. When I use Inkscape (.deb package) all is very fast and normal. Same for Geany 2.0 (Flatpak) and Telegram 5.3.2 (Flatpak, not an Electron application), all is normal. The problem is less dominant with Skype (Flatpak, uses Electron), there is the file selector not so slow but still need a few seconds to open.
Seems another user already had this problem, but he found no solution:
I'm using the .deb package; I rarely use Flatpak myself. Although I've only tried VSCodium and not other programs but will try to compare once I get a chance.
Just to rule out the obvious, can you share the version of Zorin OS, VSC, Discord, etc. that you are using? Also the output of:
apt list --installed | grep portal
I'm not expecting anything unusual there but just to double check.
As a last effort, you can try to create a configuration file at ~/.config/electron-flags.conf with the flag --force_high_performance_gpu or --force_low_power_gpu. Sounds like these are mutually exclusive so try each on their own.