Freezing to black screen after an hour

After an hour or so, the game freezes and turns into a black screen, and then gives me a PSO2 not responding error. From what i've gathered it's usually whenever a GUI pops up or something, but i'm pretty sure it has happened when I was AFK doing things. I am able to run the game in general just fine and usually the GUI's don't crash me until some time has passed... I also have Discord open to talk to my friends while playing and for some reason when the crash happens Discord turns into a black screen too, making me have to close it through task manager. Does anyone know why this happens? The game runs great but then it just freezes then crashes and I don't know how to fix this.

Some extra information I guess, even though it's probably not useful but I tried playing the game on my main GPU which is a 1050, but the game runs worse on that for some reason, I also tried to search on the internet if anyone had the exact same problem and all I could find was stuff that was similar but not quite the exact problem that I had, and some of the solutions to those problems didn't do anything for me. I also play the game using Steam and I did run a "check file" and that didn't seem to do anything.