I found the answer.
I fixed it by removing the main loop on window2 since camera window2 also runs in tkinter.
I have 2 windows, first is the main window (window1) and another window with opencv (window2). I have a button on window1 that opens window2. Whenever I open window2 on window1 the camera won't show on the GUI. But if I open window2 individually which is on a different file, the camera is showing.
I tried to put it on a single python file, and it still doesn't work, the camera is still not showing.
python - Opening another tkinter window with opencv camera don't show live feed