How do I keep scripts between renderings in Blazor .Net8?

I’m using blazor .net 8 with global interactive auto and I’ve put my scripts in App.razor, but they only load in prerender, when the application render interactive mode the scripts stop working and do the “flick” because the page is render for the second time.
How do I persist the Javascripts between renders (prerender to Interactive Auto for example)?

I’ve read a few things and discover the “data-permanent”

<div data-permanent> 

but doesn’t work.

Is there any way to persist Javascripts scripts between renders?