Using multivalue variable to query in a Prometheus datasource

I’m using grafana v8.5.5 and I created a query variable called api_context with multivalue enabled.
The values in these variables have slashes, for example, /v1 and /v1/accounts.
I am using this variable in a graph.
sum(aws_apigateway_latency_p50(dimension_Resource=“/test/${api_context:regex}”})
But a backslash is being added to the value, (\/v|\/v1\/accounts).
How can I solve this?