For some reason deleting the StartupWMClass=jetbrains-ideaStartupWMClass=jetbrains-idea
from /usr/share/applications/usr/share/applications
and having the .desktop file with StartupWMClass=jetbrains-ideaStartupWMClass=jetbrains-idea
at ~/.local/share/applications~/.local/share/applications
did the trick.