@Himanshu Bajpai I think you need to whitelist the IP ranges that fall under BatchNodeManagement.<region>
and AzureMachineLearning.<region>
from the list of Azure IPs for your region under the respective categories. The list of azure IPs can be downloaded from here.
Depending on your region try whitelisting these IPs instead of the public IP of your compute and check if it works. For more details about setting up inbound and outbound network configuration for Azure ML, please refer this page.
If an answer is helpful, please click on or upvote which might help other community members reading this thread.