The utility model and the invention patent were reported together in May, and now I want to modify the invention patent separately, is it ok?

You can modify the invention patent, but I suggest you modify it directly without withdrawing the lawsuit. If the revision is large and has to be withdrawn and resubmitted, it depends on whether the revised part is novel and creative, otherwise it may not be authorized because of the prior application for utility model, which will eventually lead to the loss of novelty.