mute button not working after scene is reloaded

Hello;
I am using dontdestroyonload() Method,
whenever the player dies and then I hit the replay Button or if I win and go to the next scene. all is working fine.
perfect.
but the mute button does not work anymore.

what can I do to make the UI Mute button work even if the scene is reloaded?
I found some solutions such as using playerpref for audio.

I tried many scripts but no use.
can anyone give me an example?

hey. i exprienced the same. how u solve it?