Dear Arash,
Let me give you a working example. Create a .tex file which will be a beamer presentation, and write that you are going to use some theme, e.g.
\usetheme{CambridgeUS}
Now with the old behavior of kpsewhich, you could ffap on CambridgeUS, and it would offer to open
/path/to/texlive/2025/texmf-dist/tex/latex/beamer/beamerthemeCambridgeUS.sty
I captured the invocation of call-process by adding advice, and the invocation of kpsewhich would have been equivalent to
kpsewhich "CambridgeUS.sty" "CambridgeUS.cls" "CambridgeUS.ltx" "CambridgeUS.tex" "CambridgeUS" "beamerthemeCambridgeUS.sty" "beamercolorthemeCambridgeUS.sty" "beamerfontthemeCambridgeUS.sty" "beamerinnerthemeCambridgeUS.sty" "beamerouterthemeCambridgeUS.sty" "CambridgeUS.ldf"
If you run this from a terminal, with the new kpsewhich, you will see that there are a bunch of blank lines both before and after the correct path. All of the non-matching paths (e.g. CambridgeUS.sty) result in blank lines.
The reason you didn't find any issue with hyperref is because the first argument to kpsewhich happened to actually exist in the tex tree.
Hope that explains why this is needed!
Best
Leo
PS Of course you might not want to edit a system-installed beamer theme, but maybe it's a user-installed one in TEXMFLOCAL; but the overarching point is that the current ffap code with latest kpsewhich will only work if the first argument happens to be the correct one.