Quoting what I have been told when asking around about this:
You can probably move it by parenting the light's transform to the camera GameObject, then unparenting when finished moving it. When you change a transform's parent, you should call set_SameJointConstraints on the parent transform. Not to change it but just to call it, because calling it seems to do something that completes the parent-child relationship. Otherwise often the child wont move when you set its transform
Maybe this repo would help.
Quoting what I have been told when asking around about this:
Maybe this repo would help.