Thanks for reporting this bug. In a quick attempt to reproduce the comp you showed, I was not able to engage the issue.
A few questions:
Does this go away if you choose Edit > Purge > Image Cache Memory, or Purge > All Cache? It may be necessary to clear both the image cache and the disk cache.
Does this only occur in this comp or in other comps?
What does the comp look like when the visibility of the layers is enabled?
Thanks for reporting this bug. In a quick attempt to reproduce the comp you showed, I was not able to engage the issue.
A few questions:
Does this go away if you choose Edit > Purge > Image Cache Memory, or Purge > All Cache? It may be necessary to clear both the image cache and the disk cache.
Does this only occur in this comp or in other comps?
What does the comp look like when the visibility of the layers is enabled?
Does the problem reproduce in After Effects 23.5 (the public release version, not After Effects Beta)?
On the surface, this looks like a case where a frame is stuck in the cache. Individual frames in the cache are identified by a code generated from the state of the comp (things like comp name, state of layer switches, etc.), and while it's unlikely it's actually possible for two cached frames to have the same identifier. Clearing the cache should fix this by forcing After Effects to recalculate the cache ID's.
But if that's not the case, we'll need to inspect the project to understand what's happening. Can you DM me a link to the project if the above does not fix it?