*could have swear it worked with the X button...*
Indeed it makes sense... you created a new VI in the LabVIEW environment so it asks for saving it before closing the panel.
One thing you can try (I didn't) is to use a Winodws utility on NI zone
here. It allows you to intercept the window closing message and close the panel programmatically.
In Run-Time environment, the dialog won't appear. So if it is intended for Run-Time, you can let the code as is. If not you can save the VI programmatically to a dummy place when it is run so the save dialog won't appear again.