Are you running from self-hosted agents or Microsoft-hosted? You can't connect to your private endpoints from Microsoft-hosted agents, and you'll have to use self-hosted agents in that situation.
Important
You cannot use private connections such as ExpressRoute or VPN to connect Microsoft-hosted agents to your corporate network. The traffic between Microsoft-hosted agents and your servers will be over public network.
Are you running from self-hosted agents or Microsoft-hosted? You can't connect to your private endpoints from Microsoft-hosted agents, and you'll have to use self-hosted agents in that situation.
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops