No idea but I see there's an old thread about: DRI_PRIME=1 not working for Minecraft Java Edition
the command used there is prime-run minecraft-launcher
.
(on a side note, rather than edit the .desktop in /usr/share/applications it should be possible to copy and edit in .local/share/applications)