Hi guys,
I'm using Number Sequence for create of Sales Order through X , the code is like this :
NumberSeq numberSeq;
numberSeq = NumberSeq::newGetNum(SalesParameters::numRefSalesId());
numberSeq.used();
salesTable.SalesId = numberSeq.num();
Everything looks fine for some time, but recently I'm often gets an error while running this to create new SO. in the message will say something like this:

And when I check, that number did already being used.
And as this error hit, I think it is put in the Status list and given status "Free", by looking at this form (the SO number sequence code, Administration > Status List).

But the question is why the code gets a number sequence that already being used in the 1st place ?
Because if I saw the timestamp of the createddate, in the list, SO-DT-000000486 put on 3/28/2023 10:04:07 AM, while this SO number already exist in the system 3/27/2023 2:20:09 PM ->

Is there something wrong in the code ? FYI, the number sequence it self is set to Continuous.
Hope I can have some idea what is wrong here.
Thanks,