Exclude class labels and unable to train YOLOV8

I use this version can train my yolov8.
But if I drop a class, like this version,I can’t train yolov8.
My project is instance segmentation, may I ask what I did wrong so that the new version cannot be trained

Why does yolov8 recognize my dataset as an object detection dataset after I drop a label?

How many other classes are in your project, besides the one that was dropped?

Did you label this dataset with the Polygon tool, the Smart Polygon tool, Bounding Boxes, or a combination of them? If it was a combination, which tools did you use?

What class names are present in the data.yaml format that was included in the export? All classes in the generated version, as expected? Or are there any missing or incorrect classes listed in the file?

My project has a total of four classes, with three remaining after deleting one
I only used the Polygon tool for the entire project
data.ymal:

train: ../train/images
val: ../valid/images
test: ../test/images

nc: 3
names: ['LFQ-1', 'LFQ-2', 'LFQ-3']

roboflow:
  workspace: jiangsu-university-of-science-and-technology
  project: yolov8-lefuqiu
  version: 12
  license: CC BY 4.0
  url: https://universe.roboflow.com/jiangsu-university-of-science-and-technology/yolov8-lefuqiu/dataset/12