It’s possible to write a Shortcut to do that, but it’s a lot harder and I don’t have the time to do that. The one I wrote will search for the file. If there’s 2 of them, you can tap on the one you want. It’s an extra step, but I’m not sure what your use case for all this is.
On a side note, there is also an app Scriptable which could probably do what you want more easily. It can be integrated into Shortcuts.