The code works as it should when run in debug mode, I have no idea why its doing this.
def StartPage():
global start_page
start_page = Toplevel(login_success_screen)
start_page.title("Home Page")
start_page.geometry("500x300")
start_page.config(bg='SkyBlue1')
Label(start_page, text="", bg="SkyBlue1").pack()
Label(start_page, text="Home Page", bg="SkyBlue1", font=("Calibri", 15, 'bold')).pack()
Label(start_page, text="", bg="SkyBlue1").pack()
Button(start_page, text="Add Students", bg="#000066", fg="white", height="2", width="20", command=New_Register,
activebackground="cyan", font=("Verdana", 10, 'bold')).pack()
Label(start_page, text="", bg="SkyBlue1").pack()
Button(start_page, text="Mark Attendance", bg="#000066", fg="white", height="2", width="20",
command=MarkAttendance, activebackground="cyan", font=("Verdana", 10, 'bold')).pack()
Label(start_page, text="", bg="SkyBlue1").pack()
Button(start_page, text="Log Out", bg="#000066", fg="white", height="2", width="20", command=close_windows,
activebackground="cyan", font=("Verdana", 10, 'bold')).pack()
icon = Image.open("back-button.ico")
icon1 = icon.resize((40, 40), Image.ANTIALIAS)
icon2 = ImageTk.PhotoImage(icon1)
Button(start_page, text="", image=icon2, bg="SkyBlue1", activebackground="cyan", borderwidth=0).pack(side=LEFT)