Not all of the items considered headings in your source data set will be visibly present in the RecyclerView
at any one time, just those in the current subset of the data presented by the RecycleView.Adapter
. Without being visible on screen, accessibility services like TalkBack don't have access to those other headings and therefore will not interact with them.
Technically, you could look at setting up custom handling of the accessibility tree, but this would need to handle all accessibility info for the view, not just the headings, and would likely impact performance especially for large data sets. There is no way to override the heading handling alone.
The behaviour your describe is default and expected behaviour on Android, even if it doesn't seem ideal from a screen reader user experience perspective.