Browser Graphic issues of Debian 21.12 gnome

I’m having the same issue as the other user posted:
Help with Gnome Image - Products Support / Qualcomm RB5 - 96Boards Forum

i.e., screen flashes and goes to login screen after starting Firefox or OpenGl program.

I installed chromium browser and had the same issue.

I tried to start Firefox from terminal by “firefox -P” and was able to run the browser.