Hi,
the "escape" option is at the wrong position of the statement. It is an option for the LIKE predicate, so it has to be directly behind the expression for the LIKE predicate (... LIKE lower('%@@') ESCAPE '@' ...).
If this statement is generated as you described, I would open an incident (or check it with a responsible SAP colleague if you have the option as you are a SAP employee).
Best Regards,
Florian