Prefs > Midi > Reset on stop would be prime candidate, however in a Loop it could actually be any of the 'chase' parameters below that - you may have to experiment.
Without specifics of precisely what is being reset, that's the best I can guess at.
Is the compression applied correctly? It sounds like you are applying compression to the overall signal rather than just the guitar. In that case, if the secondary instrument gets louder, it could trigger the compression of the entire signal resulting in a reduction in the signal level of everything else going in to the compressor that was at static level.