My cookies is unset after couple of sec when user gave consent

Has problem with cookies consent banner. It appears each time when refresh the page or go to new page, the reason from my observation is the cookie that store consent value has been unset or disappear after couple of sec when user gave his consent to some purpose or accept/reject all. How to fix this?

Need to note that currently I haven’t any code that set or unset cookies