Is there a way to not auto-pause looped interactions when leaving the browser tab?

It breaks animations that are in sync with autoplayed slider.

Alternatively pausing slider when window (tab) is not in focus could work as well. Could you please help me with the script to accomplish either?