It never occurred to me, but when you SEARCH for an empty string, all cells that contain something return the number 1. Only cells then are truly empty return #VALUE!.
That's why your FILTER function picks-up all rows with something in it, when you search for nothing in K17. Wrap the formula in
=IF(K17="","NA", FILTER( etc........ ))
Since your Excel version supports dynamic array functions, you may want to consider the following formula in I20, in stead:
=IF(K17="",NA(),FILTER(A20:E48,BYROW(SEARCH(K17,A20:E48),LAMBDA(arr,COUNT(arr)))))