The issue was caused by 29aaa2922d.
With the change from the offended commit there was nothing that
would have informed objects previously linked to a light that they
need to re-calculate their light linking collections.
This change makes it so scene's hierarchy is tagged for update,
which propagates to all dependencies which do depend on hierarchy
of objects and collections in the scene.
This brings behavior closer to what it used to be, without causing
slowdown with full re-evaluation (which was fixed by the offending
commit).
Pull Request: https://projects.blender.org/blender/blender/pulls/119698