Evaluating expressions in the pagination fields (‘Has Next’ and ‘Next URL’) is not the same as evaluating expressions in a Mapper with an incoming object. The behavior is different since the very same output of the snap is used to calculate whether there is a next step or not.
That’s why I think @AleksandarAngelevski 's solution is correct, and I suggest you to try and validate or run the pipeline to see the actual results.