First, use a folding frame to hold the part of the block to be preserved, then XC, blank, select the block to edit, and then confirm directly, then select the polyline (S) in the next step, then select the polyline, and confirm, and it will be OK. Then, you can delete the polyline, and the block you edited will still be partially displayed. Xc command is a good method. You can't change the basic properties of a block in the same situation.
For example, figure 1 has a block, and I'm going to hide the white line. You can follow the above order.
It will become like this.