Opening sketch in file explorer doesn't work

Right-clicking a sketch in Windows File Explorer - then open with Arduino IDE - still doesn't work. It can't be that complex !?

Instead, the last used file is opened

From the "still", maybe you already posted about this and got the answer? Well, anyway I'll answer it:
This is a known deficiency being tracked here:

(reporter mentions macOS but all operating systems have the deficiency)

Some work was done on it here:

but never completed.

You can subscribe to that issue and pull request to get updates on any progress on the issue.

Feel free to submit a pull request to add the desired capability to this free open source software.

I may be wrong but I was under the impression the association was not going to be implemented until V2 was leaving beta.

However you can simply edit the Windows file type and create the association.

I just noticed that rudy has an open issue about this on GitHub:

Do you have a reference for that? I just had a quick browse, but didn't find a statement about it from one of the people involved in the development. However, the Arduino community tends to report things over and over again rather than taking the time to search for an existing issue report or forum thread and consolidating all discussion to a single place, so it might well be that I missed the specific one that contained that information.

Unfortunately that doesn't work because Arduino IDE 2.x doesn't have any way to pass the sketch path as an argument from the command line. A file association just runs a command like this:

Arduino IDE.exe <path to the sketch>

but the IDE simply ignores that sketch path argument, so it's no different from running this command:

Arduino IDE.exe

Do you have a reference for that?

No it's just something I recall reading. It could be old and obsolete info by now.

Unfortunately that doesn't work because Arduino IDE 2.x doesn't have any way to pass the sketch path as an argument from the command line.

I never actually tried it.

Sorry I couldn't be of more help.