Hello! can you post the project/screenshots of your settings and bone hierarchy? what kind of moment are you trying to achieve? What does it mean that the two bones "stop working after some time"? does it happen during an animation?
With little info, this is the advice I can give for now:
sometimes constraints appear to stop working, when in reality they are being overriden by other constraints in the list, in these cases resetting the constraints order, or changing it manually helps solving the problem:
Constraints: Order
You may have accidentally keyed different settings during your animation for your constraints. So removing these keyframes may help fixing the problem.
Also, values set in an animation only affect said animation.
A transform constraint generally doesn't work if the constrained bone is a child of the target bone.
In cases such as rotation, if the value is not 100 or -100 you may see a hiccup due to the rotation mix not matching.
If you manually key a constrained bone whose mix is not 100 you may see it behaving differently than what you'd expect moving only the target bone.
These are some of the possibilities I could think of, but of course with more precise information it would be easier to nail down the causes of your situation.