How to do [TraceRayInline] in closest hit shader?

I wanna learn about DDGI implementation in URP

After placing probes, i trace some rays from each probe, when ray intersect with any geometry, i need to trace ray again from intersection point to the directional light (so i can know this point is in shadow or not)

// When this shader is called, that means ray from probe has hit geometry
[shader("closesthit")]
void ClosestHit(inout DDGIPayload payload : SV_RayPayload)
{
    // I need to trace shadow ray from hit point
   // In order to know if the hit point is in shadow.
    bool visibility = TraceDirectionalShadowRay(mainLight, hitPosWS);
    if(!visibility) return;

    // If hit point is not in shadow, we can compute its radiance use Lambert Diffuse Law
    // If hit point is in shadow, radiance will keep to zero.
    float3 radiance = ComputeRadiance(...);
    payload.radiance = radiance;
}
            bool TraceShadowRay(RayDesc rayDesc)
            {
                RayQuery<RAY_FLAG_CULL_NON_OPAQUE | RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES | RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH> q;

                q.TraceRayInline(_AccelerationStructure, RAY_FLAG_NONE, 0xFF, rayDesc);
                while (q.Proceed())
                {
                    switch (q.CandidateType())
                    {
                        case CANDIDATE_NON_OPAQUE_TRIANGLE:
                        {
                            q.CommitNonOpaqueTriangleHit();
                            break;
                        }
                    }
                }
                return q.CommittedStatus() != COMMITTED_TRIANGLE_HIT;
            }

            bool TraceDirectionalShadowRay(Light light, float3 worldPos)
            {
                RayDesc rayDesc;
                rayDesc.Origin      = worldPos;
                rayDesc.Direction   = light.direction;
                rayDesc.TMin        = 1e-1f;
                rayDesc.TMax        = FLT_MAX;

                return TraceShadowRay(rayDesc);
            }

I found some implementations use TraceRayInline to trace shadow ray from intersection point, i tried to use the same way in Unity, but in URP (with Unity 2022.3.17f1), i got some errors:
[ Opcode AllocateRayQuery not valid in shader model lib_6_3(closesthit) ]
[ Opcode RayQuery_TraceRayInline not valid in shader model lib_6_3(closesthit) ]

Hi! Ray tracing shaders don’t support ray queries, so you still have to use TraceRay for shadow rays. Be sure to set the #pragma max_recursion_depth 2 in your raytrace file if you shoot a shadow ray from a closest hit shader, otherwise you’ll crash the GPU.
Inline ray tracing (ray queries) support in rasterization and compute shaders was added in 2023.2.

Thanks a lot for replying and useful tips! I will try to use TraceRay instead later