Try replacing "ranking" with "ranking.profile" - per https://docs.vespa.ai/en/reference/query-api-reference.html this is the full name and https://docs.vespa.ai/en/query-profiles.html#using-a-query-profile you cannot use aliases ("ranking" is an alias).
I think this will at least solve the problem with the missing ranking profile data