> I have also noticed that layers which show this message miss the "rows" attribute,
Search results w/o "rows" have not been indexed by our back end. There can be 2 reasons. Either they are not shared w/ everyone, and therefore not accessible to our indexer, or our indexer has not yet got around to indexing them yet
> I found out that it helps to share and unshare the AGOL item with Open Data group couple of times
After doing that, did you notice that the "rows" are visible in the search result? If so that means that the item (for the service) was indexed.
> I am not so glad in this unpredictable behavior.
You should not need to repeatedly share/unshare the items. Our indexers will find them as long as they are shared w/ everyone, and especially if they've been added to an Open Data group. It may take time. You may also find this useful: https://community.esri.com/community/gis/web-gis/arcgis-hub/blog/2019/12/09/how-to-manually-refresh-...
I can tell from the image above that the particular layer was indexed
Regardless, even if you do not see a "rows" count on the search result (i.e. it has not been indexed or is not shared w/ everyone), you should still see the features on the map under most circumstances. We have a fairly complex set of rules that determines when to show or not show features, but generally speaking, you should never see that message for a layer w/ only 4 rows.
The next time you have that happen, I'd be curious to know if there are any errors in the browser's console and or failed network requests.