What I did was set up a scenario with a custom webook that connect to Portal, extracts the server token, then makes a basic HTTP Request to a feature layer through it's REST endpoint. That "seems" to be adequate to keep the connection alive:
Then I have a Python script that makes an HTTP request to the custom webhook. The script is set to run every day using Windows Task Scheduler..