I think this is down to invoices.created_at timestamp, I had to directly edit this in the DB to match the freshbooks data and some of them were set NULL it seemed to be these ones which were in strange sorting.
After reimporting and setting all invoices to have an appropriate created_at, the sorting seems “normal”.