If you mean that parts of your main solute cross the periodic boundary during the trajectory, you would normally post-process your trajectory to rewrite it so that the main solute remains centered in the periodic box. For Gromacs, the program to do that and to keep other molecules together as they cross the boundary would be
gmx trjconv. If you mean that small molecules/solvent appear to "jump" across the periodic boundary during playback, you can use this
ChimeraX Recipe to select residues that cross the boundary during the trajectory. You could then easily hide them.