Hi lizenz,
This sounds exactly like an upstream issue with osTicket itself that was discussed on this forum here and here.
But that issue was resolved with 1.17.1. If you’re running 1.17.2 you should definitely not be encountering it.
Try editing include/class.usersession.php and replacing line 140 with the code on this page:
https://github.com/osTicket/osTicket/pull/6379/files
Let me know if that fixes your issue or not.