is there a way to prevent the panel users form changing the page slug or to remove that option from the sidebar?
In some cases, you need other parts of the website to fetch data from certain pages and the only way to identify those pages is by their url. In most cases, telling your client not to change the url to prevent breaking page functionality should be enough, but you never know…
You can use a select field that defines the “role” of the page and query for that in your templates. It’s not a perfect solution as it may still get changed, but it is easy to understand that changing that will change site behavior.