Finder does not open URL to file path
You can set file associations with RCDefaultApp(may not work on very new macOS)  or the new replacement SwiftDefaultApps but I haven't tested either of these for file:///.
I thought file links had been disabled in most OSes in recent years as being inherently insecure.