Execute Query (calling stored procedure) can needs some backend casting. As you noted UiPath takes in parameters as string while your stored procedure requires a cast to VarChar.
Try to use the string and cast it to varchar. A similar question where an int type is used: