I would still try the solution in this post you've mentioned Where they state:
"Right click the .sql file within Visual Studio, then click "open with", then click "add..." in "Open with" dialog. In the "add program" dialog type "explorer.exe" into the program name field and somehting into "firendly name" field e.g. "with explorer", then click ok. Then select "with exlorer" in "Open with" dialog and click "set as default". Now VS will open .sql files with explorer wich will in its turn call SSMS."
And also try the registry change
HKEY_CLASSES_ROOT\sqlwb.sql.[your_version_here]\Shell\Open\Command, replace /dde with %1
Otherwise there is this post where they write pretty much the same (you need to modify the registry):
DDE is used to allow the shell to open multiple .SQL files in the same instance. You need to modify the registry to get that to work.
NOTE: The shell associations are stored under HKCR however you can override the global settings on a per-user basis. These are stored under HKCU\Classes. Ensure you don't have an overridden version when making changes to the registry as that will cause the global settings to be ignored.
Open Regedit.
The shell first looks up the file extension in the registry to get the file type. This allows multiple file extensions to map to the same commands. NOTE: You would need to do this for each file extension you want to adjust the behavior of. Get to HKCR\.sql.
The default value of this key is the file type. E.g: ssms.21.0.
Go to the file type key under HKCR. This is where the shell gets the commands for the context menu. They reside under the shell key. You may see one or more verbs such as edit and open. You'll want to adjust the command for the default verb the shell uses.
Go to the command key. This is the command that the shell runs when you select the verb. The key here is that it must use DDE. On my machine it looks like this: "<path>\ssms.exe" /dde. The double quotes are critical to allow for long file names.
For DDE the shell then needs to know how to start up the DDE server. For that it goes to the ddeExec key.
This key has a default value that specifies the DDE command to use. For SQL it is Open("%1"). This tells SSMS to open the given file, again the double quotes are critical. Given that DDE command the current SSMS instance will open the given file in the existing instance.
The reg related file (Note change sql.21 and Microsoft SQL Server Management Studio 21 to any matching version of your actual SSMS instance):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\ssms.sql.21.0]
@="Microsoft SQL Server Query File"
[HKEY_CLASSES_ROOT\ssms.sql.21.0\DefaultIcon]
@="C:\\Program Files (x86)\\Microsoft SQL Server Management Studio 18\\Common7\\IDE\\ssms.exe,-10000"
[HKEY_CLASSES_ROOT\ssms.sql.21.0\Shell]
[HKEY_CLASSES_ROOT\ssms.sql.21.0\Shell\Open]
[HKEY_CLASSES_ROOT\ssms.sql.21.0\Shell\Open\Command]
@="\"C:\\Program Files (x86)\\Microsoft SQL Server Management Studio 21\\Common7\\IDE\\ssms.exe\" /dde"
[HKEY_CLASSES_ROOT\ssms.sql.21.0\Shell\Open\DdeExec]
@="Open(\"%1\")"
[HKEY_CLASSES_ROOT\ssms.sql.21.0\Shell\Open\DdeExec\Application]
@="ssms.15.0"
[HKEY_CLASSES_ROOT\ssms.sql.21.0\Shell\Open\DdeExec\Topic]
@="system"