How do users go to a different layout? Is it by script and does this script perform a commit?
I believe that the layout change itself will trigger the commit. In regular Filemaker, this results in the dialog if you've disabled auto save. Since the dialog itself is incompatible with the web viewer, it appears FileMaker just goes ahead and commits the record. I think you'll need to build in code that reverts the record if the user did not click a submit button on the layout. (The submit button can set a field or variable that the layout change script can check to see if the record was committed.)