This happened to me even in other programs like uGet, a downloader that also has the option "open containing folder".
The problem is, as indicated here triggered by the certain programs.
The best solution is to create or edit
~/.local/share/applications/mimeapps.list: edit the line that starts with
inode/directory= and add the name of the file manager that you use if it is not there already; if that is already there but another program is listed there first, put the file manager first (if you need the other program(s) to open folders).
For Pantheon Files it should be like
If the desktop environment is not freedesktop complient, like my Manjaro Cinnamon, the file to be created/edited should be
~/.local/share/applications/mimeinfo.cache like so:
You should post elementaryOS questions on its own stackexchange site: https://elementaryos.stackexchange.com/