Been pulling my hair out with this issue as the googled solution is not helpful. But I noticed a pattern--the problem doesn't happen in my DEV environment, which is a jumbled mess of features I'm developing within a single portal. But it does happen in production--where the site that the affected module is located is a sub-portal (http://main.com/subportal). The problem doesn't happen when I'm logged in as a SuperUser, but does happen when I'm logged in as a test user with edit rights to the page and/or module.
When logged in as a test user, when returning from the Edit page to a View page, the user gets logged out and a "critical error" message is thrown. The logs show the "validation of viewstate MAC" is the error. I noticed that the UserId in the log is -1 (unauthenticated), which should not be the case, so I ran a test.
I installed the affected module on the main portal, logged in with a newly created test user, and the problem disappeared!
So, it doesn't affect the main portal, or a SuperUser, which has access to all portals. So, in the database, I added a record to link my original test user to the main portal (it now has login rights to the main portal AND the subportal, but has no roles assigned to it in the main portal so on the main portal he has access to only the public pages for unauthenticated users). The table is dnn_UserPortals.
This resolved the error for me. Now, when the test user is logged in to the subportal and returns to the View page from the Edit page, it works just fine.