Batch Removal of "Where from" Metadata Without a Handler
You need to add:

&amp; space


To:

set end of filePaths to quoted form of POSIX path of thisFile


Example:

set end of filePaths to quoted form of POSIX path of thisFile &amp; space




Another way to resolve this issue is to coerce the list filePaths to a string before it's used in the do shell script command, as after all it does get coerced in the process.

So, just before the do shell script "xattr ... command, do the following, instead of using &amp; space as previously mentioned:

set text item delimiters to space
set filePaths to filePaths as string
set text item delimiters to ""