Cookie Banner keeps reappearing after rejection

Hi there!
Does anyone maybe know how can I stop the cookie banner for Facebook pixel to stop reappearing after switching from one page to the other? It works fine for the accepting part, but I would wish that the banner would not reappear when switching pages. Only once when the viewer enters the website and that’s it.
I’ll attach a pic of the code I am using at the moment.
Thank you!