Blinking screen after build A project

In Unity, the screen/game works normally when I press “Run,” but when I build and run the project, I get a blinking screen.
I have tried troubleshooting the issue:

Sky and Fog Global Volume/Directional Light** [Works]
Sky and Fog Global Volume** [Works]
Sky and Fog Global Volume + Directional Light [Doesn’t work; the screen keeps blinking black]

problem will show only if i add fog

Here is the result of the problem:

does anyone know how to fix?