Thanks for posting your question in the Microsoft Q&A forum.
I think you need to create client after setting credential:
synapse_client = ArtifactsClient(credential, endpoint='https://<your-workspace-name>.dev.azuresynapse.net')
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **