Why does my editor collapse when it builds a standalone window to display the UI

I want to click on a Button to pop up a new standalone window to display the MiniMap when the game is running. This window can drag and drop the game interface and zoom in and out。
I can now pop up this standalone window and all of the above, but it will crash about a minute after the popup window
I would like to know that there is a great god who has done similar functions, can share your experience with each other, or give me some advice, thanks