gnome – Ubuntu 18.04 automatic logoff even when some task is performed

I have problems with my Ubuntu 18.04 is the automatic logoff even when I do some task, like when I'm surfing the Internet, and Ubuntu automatically disconnects without error. And, of course, I must run the application again because it closed when logging out

This is very annoying, can anyone help please?

Thank you