The Viewport Render Keyframes operator didn't include keyframes from grease pencil animation or from mesh shape key animation (see T72861).
To find all related datablocks that could be considered as part of the selected object, BKE_library_foreach_ID_link(..., IDWALK_RECURSE) is used. To prevent relations like constraint targets from being visited, the recursion is stopped when it finds a different object.
An alternative approach would be to explcitly follow certain pointers, for example mesh->key. However, this would require more code, and is likely to miss some pointer as well (if not now, then in a future version). This approach seems more future-proof to me.
Since this is a fix for a new feature introduced in 2.82, I see this change as a bugfix.
This file allows you to test the feature.
- Open the blend file.
- When you open the blend file, the four objects that have a text below them should be selected.
- In the 3D viewport 'View' menu, choose Viewport Render Keyframes.
- PNG files for all frames should have been rendered, but the burnt-in frame number should show that only frames 1, 3, 5, 8, 10, 12, 14, 16, 18, and 19 have been rendered. These are the only frames for which the selected objects have keys.