Assuming it's not a limitation of Java and the JDK, I will see what we can do about getting this working as expected for version 4.2.
In the meantime, I would use File -> Open, or drag and drop your .sql file into SQLDev - that seems to be more reliable for me at least.
There's also File > Reopen and View > Files.
FYI, this is still happening to me in version 22.214.171.124. It's very unpredictable. Sometimes, after a reboot, double clicking on SQL files works and in tends to stay working unless you close sql devloper and open it again (at which point it might or might not work). Other times after a reboot it doesn't work at all.
There is, however, one clear pattern that seems 100% consistent: once it stops working, the only thing that can potentially fix it is a reboot. I have tinkered endlessly and I've never ever gotten it working again without rebooting. (with the only exception that if sql developer is closed, if you double click on a sql file it'll launch sql developer and open that one file but then crash like usual for subsequent files)
Another note, this is not limited to double-clicking on a file in Windows Explorer. From what I've seen it effectively prevents any way to programmatically open a file in sql developer. You can't open them via CMD's start command, nor directly running sqldeveloper.exe (or sqldeveloper64w,exe) with the file path as an argument, nor via powershell's invoke-item. Everything always ends with "SQL Developer has stopped working".
Yes, this is very annoying, I have similar problem also with the newest version (sqldeveloper-126.96.36.199.356.1154-x64) in Windows. I really hope you could solve this issue :-)