You just need to add this attribute to your bootstrap script tag "data-navigate-once", It will stop livewire from re-evaluating the script each time it navigates. Effectively solving the problem.
Refer to the docs here for more information: https://livewire.laravel.com/docs/navigate#reloading-when-assets-change