Is there a way to merge colored drawings while keeping their overlap?

Hi! Is there a way to merge two drawing layers, each with their own line art and color art while maintaining their overlap? When I merge these two rectangles for example, the line art and color art merge independently and suddenly the outlines show through. Is there any way around this?