Unless of course, you mean that I should first sort my data from longest to shortest (or in any case, arrange them as I wish) and then do the ‘batch_size=None’ DataLoader?

Yes, this is what I’d do. But then, again, it is what I did the last time I looked at this problem, if you think it is not a good fit to your application, you should not hesitate to ignore the suggestion.
Best regards
Thomas