Ok, I’m probably not understanding completely. My thinking was the user will probably only scan the qr code once and when they do you’ll be notified.
To disable the back button from working are you doing a when page is loaded so you can load the javascript?
You’ll need the toolbox plugin:
history.pushState(null, null, window.location.href);
history.back();
window.onpopstate = () => history.forward();
This code immediately forces the page to go back forward without actually taking the user back.
But, as I said it is seldom recommended to disable a back button for a variety of reasons.