Hi @MeToo_,
Could you please share a full screenshot of the configuration of your flow?
I have made a test on my side and don't have the issue that you mentioned.

But this design can not check whether the filename contains the specified value, because "triggerOutputs()['headers']['x-ms-file-name-encoded']" outputs some special encoding values, not the name of the file display.

You could use Get File metadata to get the Display Name of the file to judge. Then use Expression to check if one or more specified values are included.
Expression reference:
@and(contains(body('Get_file_metadata')?['DisplayName'], 'Acme'), contains(body('Get_file_metadata')?['DisplayName'], 'Test'))
It worked, as below:

Please take a try and let me know if issue still exist.
Best Regards,
Barry