Gilded light / maximize effects

When a ranger is equipped with an upgraded Gilded Light (which lights dark enemies on hit), and set to “Optimize effects” in targeting, they don’t prioritize lighting dark enemies the way I’d expect.