More than once, in different projects that have nothing to do with each other (no merges or project imports), I have had After Effects alert me when deleting unused comps that they're in use. I know they're not in use because I'm familiar with the projects and After Effects itself shows that these comps are not in use by not displaying a "used X times" message next to the comp name in the project panel.
Steps - search bar, type in Unused, select a comp listed, hit delete, get the alert. Finish by smacking After Effects for now having a problem with a process that didn't use to have a problem.
v 25.2.0 Build 131
Windows 11
