I don't think there is much doubt that increasing the capital gains tax has serious disadvantages/costs. Ideally, we'd like capital gains taxes to be as low as possible.
Similarly, reducing government spending will have serious disadvantages/costs. We'd like not to cut government programs.
When economists advocate either of these, it isn't because they love higher taxes (or less spending on government programs). It is because we will need to close the gap between government revenue and expenditures. Doing so will require actions that we'd prefer we didn't have to take.
As an analogy, consider our collective decision that we'll all have a vote, and decide whether each of us has to cut off a finger or each of us has to cut off a toe. If we don't decide soon, we'll have to cut off two fingers (and two toes) later on.
Some of us would go on TV and declare "We want to cut off our toes." That's not because we'd prefer to have 4 toes. We're just voicing our preference given a choice we'd prefer we didn't have to make.
The same can be said of economists advocating for higher capital gains taxes.* They'd prefer low capital gains taxes if we didn't face hard choices. But we'll have to make choices we don't like in order to reduce the deficit.
* You could probably find pundits out there who hate wealthy people as a matter of ideology. I'm not including them when I talk about "economists," and those pundits are generally laughed at by the research economics community.