It should be possible to change the list of file types that are automatically opened after being downloaded. Ideally, this ability should be exposed in the UI. In past versions of Safari, this functionality was available via a plist, but Apple ended up removing it in Catalina or Big Sur.