you should recreate your window and initialize it the same way you originially did.
def restart_func():
global window
window.destroy()
window = tk.Tk()
run_gui_initialization_function()
this is usually why some applications prefer OOP instead of functional programming, as there is usually no global state in OOP programming, while for functional programming, your run_gui_initialization_function should reinitialize all of your global state variables again.
an alternative way people do this is as follows
def main():
# do main app here
if __name__ == "__main__":
main()
this way you just need to run main() again after deleting your window if you ever need to restart your app.
Edit: okay, here's an easier to implement but too messy way to do this, you can start a detached version of your application from your executable ... but this is the wrong way to restart an application, and it might fail in some cases.
from subprocess import Popen
import sys
def restart_func():
window.destroy()
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
Popen(sys.executable,start_new_session=True) # if running as executable
else:
os.startfile("main.py") # if running as python script