@Agustin_Miguel, after 7 days without a reply to my followup request, I can only imagine that you either found the solution or that your problem was not really that important.
If you found the solution by yourself or elsewhere please share and mark your shared post as the solution. Otherwise please followup.
Without further details, I can think of 1 situations where this could be the case.
Numbers stored as strings do not have the same order as numbers stored as numbers.
For example, vuln_id:‘3’ will come after vuln_id:‘21’ but vuln_id:3 will come before vuln_id:21.