The strings in the criteria query are always transformed into parameters, even if you use CriteriaBuiler#literal(). This implicit parameter binding mechanism of all literals in criteria queries conflicts with the type checking in the SearchedCaseNode. The ParameterNode doesn't carry any data type information.
Ugly workaround, forcing creation of LiteralNode: