Server SSL connection to Helix Core Digital Ocean droplet keeps dropping/timing out

I’ve created a Perforce Helix Core droplet on Digital Ocean and have been able to use it successfully. However, after a while, the connection eventually drops and I am unable to connect. I get errors such as these:

Perforce reconnection prompt.

SSL connection failed.

I tried opening adding inbound and outbound rules for port 1666 on my computer to see if that fixes it, but the issue persists.

Port 1666 inbound rules

Port 1666 outbound rules

I think it’s a local machine issue, because every now and then, like after a reboot, I can once again connect and use Perforce fine for a while. The Digital Ocean droplet seems fine as well.