An Azure relational database service.
What service tier do you have for the database? (You can check this on the overview page in the Portal). It sounds like you have a Serverless. A serverless database is rolled out after some time of inactivity. Rolled out means that the database is not mounted on any server, but only exists on disk. When you reconnect, the database is rolled in again, but this takes 30-60 seconds, which explains the connection errors you get.
Is Serverless bad or not? Serverless is great for databases which are only used occasionally, because when they are rolled out, you only pay for disk. But if they are used frequently, it is not such a good deal, because when they are active, they are more expensive than a provisioned database.
If you don't like the behaviour of Serverless, you can change to a provisioned service tier. But I recommend that you keep an eye on the costs, so that the bill does not come as a suprise.