Path variable not working in route

I am deploying APIs through OpenAPI spec (3.x). Assume, the path mentioned in my OpenAPI spec yaml file is “/anything/{myid}”. Here, myid is the path variable. After deployment of this API in the Kong, its route path will be shown as /anything/(?<myid>[^\/]+).

Below is my configuration in the Kong after deployment which used to work on 2.8.2 but not working after kong enterprise upgrade to 3.1.1.

**Route Configuration:**
"Method:GET"
"Path: /anything/(?<myid>[^\/]+)"
Strip path: false

**Service Configuration:** (You can consider any backend)
host: httpbin.org
port:80
path: /
protocol: http

After sending request to my kong api say https://mykongdomain.com/anything/12345 , I am getting below response.

<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<title>Error</title>
</head>

<body>
	<pre>Cannot GET /anything/12345</pre>
</body>
</html>

Can you please assist if there is any change in the path variable configuration in 3.1.x upgrade. If yes, please assist how I can mention path variable in the OpenAPI spec so that it will be captured correctly as route path.

There is no issue with any other APIs which do not have any path variable.