I’m curious why you wouldn’t just set the notification for when the qr code is scanned?
You can use javascript to disable a back button but it isn’t considered the best practice.