I’ve switched to states, but still using scroll positions. This was what I understood from your advise. I’ve set it to load the first state on page load, and the rest is set to every time the condition is met.
The flickering still happens.