What is your targeted OS?
windows that information is stored in the regristry and you can set it using Godot's
OS.execute() with a VB or PoweShell script. A neat trick would be to do the file association on your PC then in the registry editor do a search for your game name then export the
.reg file which you can later use for the distribution of your game by resetting it.
Have not used windows since v7 but it used to be somewhere in
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorerand may have changed in recent years