Chiming in,
Like others on this thread my headlights were acting the same way. I bought this sensor for my '22 Z71, swapped it out in 10 seconds and now the headlights work as intended. Part# 1354621 $20 w/ shipping, cheaper to try this for me than to drive to the dealership...