The point is, you can just query the sine behavior to find out when you are behind the sprite, then change the sine behavior to not come out the other side.
For example, let's say both sprites start at the same spot. Start the sine behavior, sprite peaks out, comes back, but before it has a chance to peak out the other side, you alter the parameters of the sine behavior to prevent that.
More specifically, you can use the CyclePosition expression to know when you are mid-way through the cycle (this is the point after you've peaked out and come back), and when that happens do things like enable and disable the sine behavior (this may re-start it I'm not sure), change the magnitude to 0, or manually re-set the sprite position to the correct place every frame until CyclePosition is again on the 'peaking' side of the sine wave.