I have found when animating, Disable in renders and disable in viewports using the outliner, keyframes will disappear. For example, you have a cube, at frame 10 you keyframe the visibility in the viewport so you can see it. Then at frame 11 you keyframe the visibility off so it disappears.
Now go to the timeline or dopesheet and move the time indicator to before frame 10. You will see the keyframes, all is good. Now scroll past frame 11. as soon as you go past frame 11 and the cube disappears from the viewport and the keyframes also disappear from the timeline or dope sheet. even if the object is selected in the outliner.
Is there a way to lock the timeline so this doesn’t happen, so I can see the keys of an object if it is visible or not in the viewport? Thanks