I believe that, despite having lots of problems, it is a rather good car to drive.
If we remove "despite having lots of problems", we are left with "I believe that it is a rather good car to drive". The part between the commas is extra information which can be removed but still leaves a perfectly comprehensible sentence.
Your second example is difficult to comment on because you haven't posted a whole sentence. Please give us a complete sentence to work with.
Student or Learner