Turn off after duration is not working with HomeKit Automation

I have a HomeKit automation where if one of my HomeKit exterior security cameras detects motion I have a Hue bulb on the exterior of the house turn on and then the automation is supposed to turn off that light after 5 minutes. The light is triggered on correctly every time but for some reason the light won’t turn off after 5 minutes. I have another automation that uses this feature and it works most of the time but not all of the time. Is anyone else having this issue?

I’ve scrubbed all of my other automations just to make sure there isn’t something else that is keeping this exterior bulb on but this is the only automation linked to this particular Hue bulb. I’ve also tried deleting the automation and creating a new one and I still have the same problem.

Are you sure thar the camera triggering the automation isn’t seeing the light go off, interpreting the change as motion, and turning the light back on?

I had this issue with an internal camera I used to trigger night lights in my kitchen.