How to I pause and close a dialogue when I click a button to change scene

Godot Version

4.1

Question

I’m making a quiz game with a FNAF like mechanic on the side, I have tried implementing this system where if you click a button that changes the scene, the dialogue pauses and disappears until you go back to the main scene, I’ve tried using Dialogic.pause and Dialogic.hide as true or false but it either bugs the dialog box or just crashes the game.

Is there any other way I can do this? I’m using dialogic 2