the issues you’re having with duplicate invoice numbers are a workflow design issue.
yes, bubble has race conditions and yes you’ll have issues if you try to do scheduled invoices that all create on the 1st of the month using an api workflow on a list since that processes multiple at the same time…
but you can work around that in workflow design
just use a recursive workflow to do 1 invoice at a time
if it’s still a problem after fixing the scheduled invoices (I doubt it if you have unique invoice numbers per account since there will only be 1 or 2 users making invoices in real time per account and the chances of them both hitting the create button at the exact same time are extremely slim). then you can build a simple queue system to fetch the invoice number - although this would be overkill for 99% of invoice apps.