How do you deal with scenarios when the same user has 2 browser windows of the extension open?

This doesn’t solve OP’s problem.

The problem being EBS gets two Transactions at the same time and is processing transaction B whilst Transaction A is being written to the database. (Where transaction B is a duplicate of Transaction A)

You’ve just moved the problem