The option to disable the built-in pause menu is within Game Configuration -> Input Binding (tab) -> ESC.
Edit: you also need to disable the Main Menu from Game Configuration -> Settings (tab) -> User Interface (sidebar) -> Main Menu (off)
You have to change this to be a script that toggles the widget and pauses the game.
You can find a tutorial on Slayers YouTube Channel:
and
He goes through the steps of creating a Custom Main Menu and shows you a step-by-step guide on how to achieve this.
If you haven't already, you should join the Discord Server and ask for help there too! It can be helpful for real-time help and debugging while you're going through the steps.