Used to indicate that while something may be true or valid, there is still another contrasting point.
Verb-casual + ことは + が, い-Adjective + ことは + が, な-Adjective + だ + ことは + が, Noun + だ + ことは + が
Long explanation:
The ~ことは…が grammar point is used to express that although something might be true, there is another point or fact that is being contrasted with it. It can be translated as 'it's not that... but...', 'it may be true but...' or 'it is that... however...'. The formation for this grammar point differs slightly depending on whether it is used with a verb, い-adjective, な-adjective, or noun.