Can't display data in a repeating group in a workflow

I’'m trying to replicate a basic messenger.

I want to display a chat message list in a repeating group. The problem is that when I do it via workflow the message list in repeating group is empty. What might be the reason and is there any “right” way to do it?

I have Message and Chat entities, message has a foreign key for chat. Click on a chat shows chat window and displays data in a repeating group - does a search for messages with the selected chat.

This is how search query looks like

It seems that bubble doesn’t have enough time to complete the “Search for” query because if I do it step-by-step in debug mode everything works fine. Also it works in if I click again the same chat.

I have found a way to fix it by adding an “Add a pause before next action” step in the workflow before displaying data (pause of any duration like 5 ms works).