I noticed multiple people in the Q&A on Udemy with this problem. You can call your tear down logic in the NativeDestruct() method. Also The function that you’re binding to your cancel buttons OnClick event call RemoveFromParent(); this method destroys the widget and NativeDestruct() is called. Also Instead of Using ClientTravel() you can use UGameInstance::ReturnToMainMenu() this function handles diconnecting you from the current server and Loading the Default Map.
UGameInstance::ReturnToMainMenu | Unreal Engine Documentation