Troubles Border Animation Upon Tab Change in Web Browsers

hello guys,

i am create one hero section and i add page load border animation infinite top to bottom side. its working properly but when i change chrome (or any other browser tab) and going other tab and come back to current tab its not working properly like show as a same position border animation. not randomly show border animation.

here is my read only link :- Read Only Link

Here is the live link :- Hero Section

Here is the issue video link :- Issue Video Link