I need some help with the dedicated server

Alright so I made my own server using steamcmd i port forwarded did everything needed but the server shows up in internet tab and then like after 10-20 minutes of me being afk (i tested) it just goes offline like the server is running but its offline for other people whenever i press internet again it goes online i just used some website to test the connection and yeah after 10-20 mins i need to just click on the internet tab for it to turn online again does anyone know how to fix it?

The server browser is a fickle thing and should not be used to check if your server is actually up and running

yeah but its not lying cause its pretty obvious

Except it very well may be.
Don’t rely on the server browser when checking if your server is up and running.