Reported at T224358 for Tool-global-search, but we see the same issue with XTools and our other projects that use the mediawiki/oauthclient library. I'm not certain if mediawiki/oauthclient actually has anything to do with it, but that seems to be the commonality among these tools.
The cookie is set to expire an entire year after login, but it seems users get logged out within as little as half an hour.