If you’re worried that you’ve been hacked, you haven’t. According to a tweet by the Twitter Support account, it seems that this is a bug that is causing users on iOS 15 devices to be logged out. The company has stated that they are aware of the issue and are working on a fix for it, but stopped short of mentioning when it would be released.
https://twitter.com/TwitterSupport/status/1463553398234439681
This means that iOS 15 users can continue to use the app, but if you find yourself logged out whenever you relaunch it, there’s really nothing you can do about it if you are using the official app. You could always try using third-party Twitter apps if you want an uninterrupted experience, at least until Twitter can get a fix on this problem.
For those who insist on using the official app, it looks like you have no choice but to remain patient until a fix has been rolled out.