When setting up the private endpoint on the cosmos database, you need to pick 'SqlDedicated' as the target sub-resource. The problem was solved by creating a new private endpoint with this setting - and by using the sqlx.cosmos.azure.com endpoint for the dedicated gateway, of course.