I remember this happening a couple of months before Shadow bringers came out, but I never gave it much thought because I wasn't playing as many hours back then and so didn't notice the pattern. I just thought it was unlucky at the time when it happened. Now that I'm playing more, I noticed the two hour window and it's always consistently two hours. I play on PC through a wired ethernet connection and I've made no changes or additions to my computer or network recently.

In my attempt to solve the issue, I tried disabling my antivirus/firewall while I played to see if it was interfering but it made no difference. The antivirus and firewall had already been set to allow FFXIV.
I also saw someone recommended changing my UPnP settings, which didn't help.
I tried port forwarding as I also saw this recommended in previous posts, but did not work. The last thing I tried was disabling my network card's "Energy Efficient Ethernet" setting, but this made no difference either. I don't know what else to do. I can't pinpoint what the cause of the disconnect is.