I have VSCode installed using snap for a while, but since yesterday It's not showing up in apps/search.
I narrowed down the issue
/var/lib/snapd/desktop/applications/code_code.desktop contains
--force-user-env as in Exec=/snap/bin/code --force-user-env %F.
If I remove --force-user-env it shows up fine and works as usual.
The issue is, with every reboot --force-user-env comes back.
If I copy the desktop file to ~/.local/share/applications then the shortcut I have (Super+2) to launch VSCode, instead of going to the running instance, always opens a new window so I loose the ability to switch.