Not a Forge issue, but it has been fixed upstream already, we just need LWJGL and Mojang to ship the fixed version now
https://github.com/glfw/glfw/commit/2bc52ca82e46f6f238007b8e80b7253328bd080d
To clarify why this doesn't work, that method assumes that the program opens the file simply by consuming it as an argument, i.e. a command in the form of:
java [file]
however, jar files are run with the form of
java -jar [file]
Games shouldn't be interfering with this unless you're running them at the time.
Are you tabbing out at all after starting the game? If so, try not doing anything after launching the game.
That's not what I asked you to do.
Why are you using JDK 12 btw, you should be using 8 for full compatibility with the ancient JRE that Mojang ships with the launcher.
Are you using Mixins?