I have two shapefiles: one for the African continent, and another with cells covering the continent.
I want to remove the part of the cells outside of the African continent keeping the parts that overlap the continent. I do it using "clip tool", where my input layer is the grid and my mask layer is the shapefile of Africa, using the solution given here: Removing part of the polygon outside of another shapefile but keeping the parts that overlap
However, my shapefile of Africa has the borders of the different countries. When I applied "clip", several discontinuities of the borders appears in the clipped result. Additionally, when I select some of the cells (with identify features) in the clipped results, the borders of the country (discontinuous) are also selected.
Is there any way to remove the borders of the countries in the new clipped shapefile or maintaining them in the new clipped shapefile but without discontinuities and without selecting them when I use identify features?
I attach two images to make clear the problem. The first one refers to what happens with the borders of the countries, and the second clarify what happens when I select a cell.

