You cannot disable the reload button or the back button in a browser because refreshing a page is equivalent to navigating away and unloading the DOM. As a result, the onbeforeunload event will always be triggered. However, you can prevent the buttons from being used. This requires some effort, and it might not be possible to cover every scenario, but you can give it a try.
See: https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
The main use case for this event is to trigger a browser-generated confirmation dialog that asks users to confirm if they really want to leave the page when they try to close or reload it, or navigate somewhere else. This is intended to help prevent loss of unsaved data.