I understand this error could be frustrating.
Please verify the following (i assume you're using azure SQL server)
- verify the connection string and whether it's storing the correct credentials for logging into the sql server.
- make sure 'public network access' for your sql server is enabled for selected networks and your local machine IP address is added there under the firewall rules.
- ensure this is checked in the same page at bottom.
- Most importantly please ensure that this option is unchecked. Otherwise, no credential be it even sql admin credentials is going to work to access this sql server and you'll keep getting the same error.
Thanks, and regards, If the answer is helpful, please click ACCEPT ANSWER and kindly upvote it so that other people who faces similar issue may get benefitted from it. If you have any further questions about this answer, please click Comment.