Camera QR Code Scan always open in different safari
Cookies are maintained across tabs and windows if not in private mode and not explicitly disallowed in Safari Settings. So if you can create some cookies and update the cart on every page load and reload, different windows will not be a problem.
I assumed that this is a problem when the user is logged out. Otherwise for signed in users, cart can be maintained on the server side.