I had the same issue... Turned out it was because I used the flat pack version of intellij idea and it had problems with paths. Running from a plain terminal worked fine.
The flatpak version of intellij isn't officially maintained by jetbrains. Jetbrains only maintains the snap for linux
it's fortunate that flatpak solves this problem of reproducible environments so effectively