Rosetta is great at adding residues in order and mediocre at adding them out of order or deleting them. What you are doing is not necessarily tricky, but it requires careful handling of the atom tree.
First, before you start deleting residues, make sure you know where the cutpoint between the chains is. There has to be a cutpoint someplace or you can’t dock. Just deleting residues out of the middle won’t make a cutpoint, Rosetta will just connect the loose ends and pretend it’s a bizarre-geometry peptide bond. You presumably did some fold_tree fiddling at some point to take care of this?
Second, do the docking.
Third, when you reinsert the linker, make sure that you are popping off terminus variants as you go – Rosetta may have given you protein terminus or protein cutpoint patches on the end, which makes it impossible to add the residues.
Fourth, after you’re done, make sure to revert to a linear fold tree. You can try doing this BEFORE you start reinserting residues, it will make the reinsertions cleaner (but you’ll have to strip terminus variants before you can re-linearize the fold tree anyway).