A better option to consider might be to close the page(s) before opening a new one, it doesn't disable the back button but it will prevent the user ftom going back to the closed page.
Hlw,
You can use JavaScript to disable the browser back/forward button. You can add the a code to a JavaScript file in your Mendix application that is:
history.pushState(null, null, location.href);
window.onpopstate = function () {
history.go(1);
};
This code will disable the back button by pushing a null state to the history API and prevent the back button from being pressed by navigating forward in the history stack.