This is almost definitely the proxy timing out. When you connect to port 5432, we route you through a proxy that ensures you’re connecting to your primary. When a TCP connection hasn’t sent data for 60s, the proxy will often drop that connection.
If you connect to .internal:5433, you will bypass the proxy. You need to make sure you’re connecting to the writable instance, but you should be able to complete the operation.