How to Properly Set Up a Loading Shimmer and Empty State for Repeating Groups?

I’m looking for the best way to set up a loading shimmer and an empty state for repeating groups. My repeating groups take a few seconds to load, so I’ve added a loading shimmer, but I also want to display an empty state when there are no items. How can I configure it so that the empty state only appears after the data has finished loading and there are genuinely no items, rather than showing it during the loading process?

I’ve tried it both ways in the screenshots below and the empty state keeps showing while it loads instead of the loading shimmer.