Simple example showing how internal boundaries between solids can be preserved (with a conformal mesh) thanks to the Boolean Fragments command. See https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/boolean for more examples.
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.